Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 What brought the Avg. down?

Author  Topic 

SQLCode
Posting Yak Master

143 Posts

Posted - 2005-04-20 : 16:34:41
Hello,
We have a survey in which the avg. for this quarter went down from last quarter. Is there any easier way to figure out what made the average go down. If it is done on dealers within dealerships on given trainings, can we find which dealer's what training brought it down from last quarter to this quarter?

Thanks for reading and appreciate any help.

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-04-20 : 19:22:05
Yes, you can find out what caused the average to come down, the trick is, HOW? And you haven't given us much to work with, no schema info, DDL or DML. So, about all I can tell you is that you are probably going to need to join the table to itself or do some grouping. Perhaps take two SELECT statements on the same table but with different WHERE clauses and UNION them together with some indicator as to which set they come from and then GROUP BY and Average to start your comparison.

---------------------------
EmeraldCityDomains.com
Go to Top of Page

Billpl
Yak Posting Veteran

71 Posts

Posted - 2005-04-20 : 23:34:28
Fire the DBA...then you won't have to worry about it next quarter...ignorance is bliss
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-04-21 : 00:04:34
quote:
Originally posted by Billpl

Fire the DBA...then you won't have to worry about it next quarter...ignorance is bliss



Hey derrick, an apprentice...

--------------------
keeping it simple...
Go to Top of Page

Billpl
Yak Posting Veteran

71 Posts

Posted - 2005-04-21 : 00:51:17
quote:

Hey derrick, an apprentice...

--------------------
keeping it simple...



LOL

Actually the correct answer would be: Fire the sales manager because if he has to wait around for the DBA to identify a problem within his own department, he's not doing his job. They'll have to fire the DBA because they won't be able to afford him anymore.


...think we need more information to answer the question.
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2005-04-21 : 08:20:24
Yes. Fire the DBA, and have the sales manager keep track of everything on an Excel spreadsheet
Even better, give him a copy of FoxPro!
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-04-21 : 08:35:20
"give him a copy of FoxPro!"
no.....
"Notepad is far more reliable...and it's free with Windows!"
Go to Top of Page

Billpl
Yak Posting Veteran

71 Posts

Posted - 2005-04-21 : 12:52:50
quote:
Originally posted by AndrewMurphy

"give him a copy of FoxPro!"
no.....
"Notepad is far more reliable...and it's free with Windows!"


yeap, notepad's all you need to write CLR code to your heart's content, but then you'd really have to write REAL source code and you how all the VB'ers felt about that when they first saw VB.Net. Languages like FoxPro, Delphi, Python are all just too damn easy and nobody wants people to think programmers have it easy.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-04-21 : 17:29:14
I guess the DBA is already fired...

This kind of analysis is very easy to do in Analysis Services.
Build a cube with relevant dimensions & measures,
create a calculated member comparing measures across periods, and analyze the data.

rockmoose
Go to Top of Page
   

- Advertisement -