Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by and Count
Message
From
15/09/2021 15:11:34
 
 
To
13/09/2021 17:47:33
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01682285
Message ID:
01682291
Views:
56
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform