In How to Use GROUP BY, we worked on a simple report request and covered the basics of GROUP
BY and the issue of duplicate rows caused by JOINs. Today we'll finish
up that report while examining SUM(Distinct), and see just
how crucial derived tables are when summarizing
data from multiple tables.
Read How to Use GROUP BY with Distinct Aggregates and Derived tables