This is my query:
Select location, MAX(total_cases) as HighestInfectionCount, population, MAX(total_cases/population) * 100 as PercentPopulationInfected
From PortfolioProject..[covid deaths]
Group by location, population
order by PercentPopulationInfected desc
这是我取得的结果:
Location | HighestInfectionCount | Population | PercentPopulationInfected |
---|---|---|---|
Cyprus | 999 | 896007 | 73.7554505712567 |
San Marino | 9900 | 33690 | 72.775304244583 |
等等。
到表末,这些数值实际上开始看上去正确,但第一个约50项条目错了,从头2项可以看出。
I can t figure out what I m doing wrong.
I m trying to figure out why the first values on PercentPopulationInfected in my query are incorrect.