Skip to content

Instantly share code, notes, and snippets.

@spara
Created April 25, 2012 19:55
Show Gist options
  • Select an option

  • Save spara/2492873 to your computer and use it in GitHub Desktop.

Select an option

Save spara/2492873 to your computer and use it in GitHub Desktop.
retrieve logrecno from a set of TIGER census tracts
SELECT logrecno, t.*
FROM
geo_header_sf1 g,
(SELECT "TRACTCE10","NAMELSAD10", "COUNTYFP10" from tract_d3) t (tractce10, namelsad10, countyfp10 )
WHERE
g.tract = t.tractce10 AND g.sumlev='140'
AND g.name=t.namelsad10
AND g.county=countyfp10
ORDER BY g.tract;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment