sql-exercises / ex17.sql
ex17.sql
Raw
SELECT ROUND(((100.0 * SUM(cases))/popData2018), 2) || '%' as percentCase,
    ROUND(((100.0 * SUM(deaths))/popData2018), 2) || '%' as percentDeath,
    countriesAndTerritories FROM DailyStats
INNER JOIN CountryInfo ON DailyStats.geoId = CountryInfo.geoId
GROUP BY DailyStats.geoId ORDER BY countriesAndTerritories;