これを回避する 1 つの方法 (RDBMS サポートの対象) は、
WITH R AS (SELECT *, Sum(HeadCount) OVER (PARTITION BY date) AS SumHeadCount FROM Report) SELECT R.date, SumHeadCount, Sum(P.Quantity) AS SumQuantity FROM R JOIN Production P ON R.ReportID = P.ReportID GROUP BY R.date, SumHeadCount ORDER BY R.date
プレ>