Exercise · SQL & Querying
Predict, then run it
Predict the output
harvest(d, kg) has one row on 2027-01-01. Group by the ISO pair so the New Year week lands in the right year:
SELECT isoyear(d) AS iso_yr, week(d) AS wk, SUM(kg) AS kg FROM harvest GROUP BY iso_yr, wk ORDER BY iso_yr, wk;
Predict the exact output.