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
 SQL Server Development (2000)
 Query question please

Author  Topic 

datamark
Starting Member

1 Post

Posted - 2002-07-30 : 14:43:26
I am trying to find out how i could do this:
I have two tables
1. workorders
2. workorder_items

workorders & workorder_items can be joined with ORDER_ID

Workorders table has the following fields:
acct, sales_rep, order_type ( plus there are others )

Workorder_items has the following fields:
service_code, charge, disco_date

Here is what I am trying to do
I want to be able to run a query that would give me all sales_rep numbers grouped by 10-19 then 20-29 then 30-39 etc & count their account_id for a certain disco_date
That way I would see something like this:

10-19 254
20-29 310
30-39 900

and so on

What would be the best way to write that query?

Thank you

ojn.
Starting Member

10 Posts

Posted - 2002-07-30 : 20:52:08
see if this helps:

http://www.rac4sql.net/onlinehelp.asp?topic=288



--
-oj
www.rac4sql.net
Go to Top of Page
   

- Advertisement -