Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Select Group By (on huge table)
Message
De
27/09/2005 21:37:07
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Create Select Group By (on huge table)
Divers
Thread ID:
01053729
Message ID:
01053729
Vues:
53
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform