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
 General SQL Server Forums
 New to SQL Server Programming
 SQL Query help -for ad hoc report

Author  Topic 

r_nj
Starting Member

1 Post

Posted - 2005-11-18 : 11:33:22
Need your help to write a SQL query:

My mgr wants to know
- # of times a particular kind of service (Service ID - AAA) was done on a particular kind of program (Program ID - SP) in 2005
- what is the Service percentage? For example, service was done 40% of the time
- Average cost of the service for those programs that had it

There are more than 100 tables linked together.

Please help..

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2005-11-18 : 13:57:43
You may wish to create some views to simplify your queries.
What do you have so far?
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2005-11-18 : 14:40:58
Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2005-11-21 : 15:59:06
In order for anyone to help you, you'll have to be able to give us a little more information. For instance... Which of the 100 tables does your data reside in? You'll have to walk through those tables and figure out where to start, and which links are important, and which are not, and then show us the table DDL to create those tables, and give us some sample data that would be found in them.
Go to Top of Page
   

- Advertisement -