AlexTheAnalyst / PortfolioProjects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Covid analysis creating table issue as final output generation issue

DATA-Meta opened this issue · comments

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 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, Thank you Nazia for mentioning the corrections will do .