Skip to content

Commit 20d4b76

Browse files
committed
Added single view which returns all tracts in MSAs with associated MSA code and name.
1 parent a274ec2 commit 20d4b76

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
DROP VIEW IF EXISTS acs2010_5yr.vw_msa_county;
2+
CREATE VIEW acs2010_5yr.vw_msa_county AS
3+
select stusab, name AS cbsa_name, state || county AS fips, cbsa,
4+
CASE WHEN name like '%Metro Area%' THEN 'metro'
5+
WHEN NAME LIKE '%Micro Area%' THEN 'micro'
6+
ELSE NULL
7+
END AS metro_micro
8+
from acs2010_5yr.geoheader where sumlevel = 322
9+
;
10+
11+
--SELECT * FROM acs2010_5yr.geoheader WHERE sumlevel = 320 and name ilike 'New York%'

0 commit comments

Comments
 (0)