Created
July 2, 2014 15:05
-
-
Save wboykinm/bb44358965dceb519104 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
census=# CREATE TABLE income_join AS (SELECT bg.geoid,bg.the_geom,bg.namelsad,acs.b19001001 FROM tiger2012.bg bg LEFT OUTER JOIN acs2012_5yr.b19001 acs ON (bg.geoid = acs.geoid)); | |
SELECT 220740 | |
census=# SELECT count(*) FROM income_join WHERE b19001001 IS NOT NULL; | |
count | |
------- | |
0 | |
(1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try this:
CREATE TABLE income_join AS (SELECT bg.geoid,bg.the_geom,bg.namelsad,acs.b19001001 FROM tiger2012.bg bg LEFT OUTER JOIN acs2012_5yr.b19001 acs ON (bg.geoid = substr(acs.geoid,8))