Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Select Group By (on huge table)
Message
From
27/09/2005 21:37:07
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Create Select Group By (on huge table)
Miscellaneous
Thread ID:
01053729
Message ID:
01053729
Views:
52
My table fields are...
cClass
cSku
cSupplier
cStyle
cCost
cRetail
nSalesQty

Table has 23 millions of records, then I need to create the best query. My query needs all fields in SELECT... a SUM on nSalesQty and GROUP BY cClass and cSku. My question is: how can I extract in the same query (or otherwise) all the rest of fields (cSupplier, cStyle, cCost, cRetail), because other fields are not aggregate. Do I need to use MAX(cSupplier), MAX(cStyle)... etc ? Or there is another way to do that? Don't forget my table is very huge.
Marc Levesque
La Prairie, Quebec (CANADA)
marc.levesque@videotron.ca
Next
Reply
Map
View

Click here to load this message in the networking platform