日付の sum と ang を取得したいとします
SELECT sum(col2) AS sum
,CASE
WHEN sum(col2 * col3) = 0
THEN 0
ELSE sum(col2 * col3) / sum(col2) AS avg
,DATE GROUP BY DATE
日付の sum と ang を取得したいとします
SELECT sum(col2) AS sum
,CASE
WHEN sum(col2 * col3) = 0
THEN 0
ELSE sum(col2 * col3) / sum(col2) AS avg
,DATE GROUP BY DATE