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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-25 : 08:51:20
|
Shawn writes "I have a feeling this is a simple question, but I just can't seem to get my head around it. I am using SQL Server 7.I have data of the following form:Poly Cat Area---- --- ----1 A 21 B 41 A 31 C 22 A 32 B 43 C 4 I would like to construct a query which sums up 'Cat's within each Poly and produce the Cat with the largest total area:Poly Cat Area---- --- ----1 A 52 B 43 C 4 The biggest problem I have is with the Group By clause: I want to produce the Cat field which I do not want to Group By and which I can not use an aggregate function on.Thanks." |
|
|
|
|
|