sql-exercises / ex18.sql
ex18.sql
Raw
SELECT countriesAndTerritories,
       ROUND(100.0 * SUM(deaths)/SUM(cases), 2) || '%' as percentDied
FROM DailyStats
INNER JOIN CountryInfo ON DailyStats.geoId = CountryInfo.geoId
GROUP BY countriesAndTerritories
ORDER BY ROUND(100.0 * SUM(deaths)/SUM(cases), 10) DESC
LIMIT 0, 10;