Skip to content

Instantly share code, notes, and snippets.

@Keareys
Created December 16, 2016 17:54
Show Gist options
  • Save Keareys/e077632575073883b7039039c7445cc5 to your computer and use it in GitHub Desktop.
Save Keareys/e077632575073883b7039039c7445cc5 to your computer and use it in GitHub Desktop.
This query checks population totals for ACS 2014 and Census 2000.
SELECT Count(geoid) as [Total Tracts], SUM(TotalPopulation) AS [Total Population]
FROM [EJ_2016].[ACS_2014_EJ_Selected_Variables]
--Has the correct number of tracts
SELECT Count(geoid) as [Total Tracts], SUM([TotalPopulation]) AS [Total Population]
FROM [EJ_2016].[CENSUS2000_EJ_SELECTEDVARIABLES]
SELECT Count(geoid) as [Total Tracts],SUM([Total_pop]) AS [Total Population]
FROM [EJ_2016].[CENSUS2000_EJ_SELECTEDVARIABLES]
SELECT Count(geoid) as [Total Tracts], SUM([TotalPop_ACS2014]) AS [Total Population]
From [EJ_2016].[EJ_Select_Variables_ACS2014_Census2000_Compare]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment