Print
-
SELECT * FROM states WHERE pop2008 > 10000000;
-
SELECT * FROM cities WHERE capital = 1;
-
SELECT * FROM states WHERE name LIKE 'New%';
-
SELECT * FROM cities WHERE name LIKE '%z%';
-
SELECT * FROM states ORDER BY pop2008 DESC;
-
SELECT * FROM states ORDER BY sub_region, name;
-
SELECT * FROM states WHERE pop2008 > 10000000 AND sub_region = 'Pop';
-
SELECT * FROM cities WHERE stateabb IN ('US-NY','US-NJ','US-PA');
-
SELECT state, (white::double precision/total) * 100 AS pctwhite FROM census2010;
-
SELECT sub_region, Sum(pop2008) FROM states GROUP BY sub_region;
-
SELECT states.name, census2010.total, states.geom FROM states INNER JOIN census2010 ON states.name = census2010.state;
-
SELECT states.sub_region, Avg(census2010.male) FROM states INNER JOIN census2010 ON states.name = census2010.state GROUP BY states.sub_region;