Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by and Count
Message
De
15/09/2021 15:11:34
 
 
À
13/09/2021 17:47:33
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01682285
Message ID:
01682291
Vues:
57
>I understand I may need to add a subquery somewhere to make that fit. Any suggestion on the best practice?

Naomi gave you the answer, but just to jump in as well....anytime you have a pattern of two or more 1-many relationships and you're doing aggregations against multiple child tables, you must break it up into multiple subqueries, or multiple temporary result sets. Otherwise you'll get over-aggregation of the answers.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform