Posted by Spook on 03/14/07 03:04
I have a SQL table with the following fields:
accounts, orderid's and datetime
Account OrderID Datetime
1 1 2007-03-01 09:30
1 2 2007-03-01 09:35
10 3 2007-03-01 10:30
2 4 2007-03-01 11:30
10 5 2007-03-01 12:30
Using Query Analyzer, I'd like to run a query where the results are a count
of orderId's by account on any given day like what I have below:
Account Orders Date
1 2 2007-03-01
2 1 2007-03-01
10 2 2007-03-01
Eventually getting it to this output:
Date TotalOrder
2007-03-01 5
Thanks for the help!
[Back to original message]
|