select *,
(TotalDeaths/TotalCases)*100 as PercentDeath,
(TotalDeaths/population)*100 as DeathPercentPopulation
from ( select location,
population,
sum(newcases) as TotalCases,
sum(newdeaths) as TotalDeaths
from deaths
where continent is not null
group by location
) as newtable
order by DeathPercentPopulation desc
There several digits after decimal in "PercentDeath" and "DeathPercentPopulation" column. However I just want to display two digit after decimal. How can I do that without nesting this query again?
