Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by and Count
Message
De
15/09/2021 15:12:58
 
 
À
15/09/2021 15:11:34
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01682285
Message ID:
01682292
Vues:
37
>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.

Thanks, yes, this is exactly what I did. I now have a query which is more easy to read and it does the job pretty good.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform