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
--insert into #PercentPopulationVaccinated
--select dea.continent, dea.location, dea.date datetime, dea.population, vac.new_vaccinations, sum(cast(vac.new_vaccinations as int)) over (partition by dea.location order by dea.location, dea.date) as RollingPeopleVaccinated
--from PortfolioProject..covidDeaths dea
--join PortfolioProject..CovidVaccinations vac
--on dea.location = vac.location
--and dea.date = vac.date
--where dea.continent is not null
The minor errors which i can notice in this code are
1 - comma will not come in just before the closing parenthesis of create table
2 - in insert section dea.date** will be there instead of dea.date datetime
Hi at 1:09:14, when creating a table, I have an issue
---- Temp Table
--Drop Table if exists #PercentPopulationVaccinated
--create table #PercentPopulationVaccinated
--(
--continent nvarchar(255),
--location nvarchar(255),
--date datetime,
--population numeric,
--new_vaccinations numeric,
--RollingPeopleVaccinated numeric,
--)
--insert into #PercentPopulationVaccinated
--select dea.continent, dea.location, dea.date datetime, dea.population, vac.new_vaccinations, sum(cast(vac.new_vaccinations as int)) over (partition by dea.location order by dea.location, dea.date) as RollingPeopleVaccinated
--from PortfolioProject..covidDeaths dea
--join PortfolioProject..CovidVaccinations vac
--on dea.location = vac.location
--and dea.date = vac.date
--where dea.continent is not null
--select*, (RollingPeopleVaccinated/population)*100
--from #PercentPopulationVaccinated
//////////////////////ERROR//////////
Msg 213, Level 16, State 1, Line 124
Column name or number of supplied values does not match table definition.
The text was updated successfully, but these errors were encountered: