You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recieve This error when putting in the query below: "Msg 245, Level 16, State 1, Line 63
Conversion failed when converting the nvarchar value 'z' to data type int."
Select SUM(new_cases) as total_cases, SUM(cast(new_deaths as int)) as total_deaths, SUM(cast(new_deaths as int))/SUM(New_Cases)*100 as DeathPercentage
From [Portfolio Project]..CovidDeaths
--Where location like '%states%'
where continent is not null
--Group By date
order by 1,2
The text was updated successfully, but these errors were encountered:
Try using this query,
Select SUM(new_cases) as total_cases, SUM(CONVERT(int, new_deaths)) as total_deaths, (SUM(CONVERT(int, new_deaths))/SUM(new_cases))*100 as DeathPercentage
From CovidDeaths
Where continent is not null
Recieve This error when putting in the query below: "Msg 245, Level 16, State 1, Line 63
Conversion failed when converting the nvarchar value 'z' to data type int."
Select SUM(new_cases) as total_cases, SUM(cast(new_deaths as int)) as total_deaths, SUM(cast(new_deaths as int))/SUM(New_Cases)*100 as DeathPercentage
From [Portfolio Project]..CovidDeaths
--Where location like '%states%'
where continent is not null
--Group By date
order by 1,2
The text was updated successfully, but these errors were encountered: