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.
| Author |
Topic |
|
hjarami
Starting Member
1 Post |
Posted - 2005-12-05 : 12:03:20
|
| Hello:I need a report showing the TOP 5 Salesman and an additional record showing the sum of the rest sales. Could I do it with a simple query?Thanks for your help.JorgeH |
|
|
jhermiz
3564 Posts |
Posted - 2005-12-05 : 13:38:50
|
No you can't, unless the first query is just returning amounts then you can perform a union.OtherwiseSELECT TOP 5 blah FROM blah2 ORDER BY TheSale DESCSELECT SalesMan, SUM(SALE) As TheSales FROM THETABLE GROUP BY TheSalesMan Keeping the web experience alive -- [url]http://www.web-impulse.com[/url] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-06 : 00:35:36
|
| Where do you want to show the data?Are you using Reports?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|