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 |
|
rinu.urs
Starting Member
4 Posts |
Posted - 2009-12-13 : 04:37:30
|
| Hi all I have a tableUserName PrinterName PageCount Messagecriss HP 7 Printedcriss Xerox 6 Printedcriss menolta 5 printedbob hp 3 printedbob hp 4 PrintedI wanted to get thouse users whos Pages count is greater than 10here criss's page count is 18 (7+6+5) greater than 10 but bob has only printed 7 lesser than 10how to write a query to get the details of the user who's Pagecount is greater than 10 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-12-13 : 09:15:35
|
[code]select UserNamefrom atablegroup by UserNamehaving sum(PageCount) > 10[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|