sql-exercises / ex16.sql
ex16.sql
Raw
SELECT continentExp, DailyStats.dateRep, SUM(cases), SUM(deaths)
FROM DailyStats
INNER JOIN DateInfo ON DailyStats.dateRep = DateInfo.dateRep
INNER JOIN CountryInfo ON DailyStats.geoId = CountryInfo.geoId
INNER JOIN ContinentInfo ON CountryInfo.ctc_id = ContinentInfo.ctc_id
GROUP BY continentExp, DailyStats.dateRep
ORDER BY continentExp, year ASC, month ASC, day ASC;