Peter Aberline wrote: > select count(*) > from points > where within(points.the_geom, (select the_geom > from states > where > state_name = 'BigState')) = true; try: SELECT count(*) FROM points WHERE within(points.the_geom, (select the_geom from states where state_name = 'BigState') AND points.the_geom && (select the_geom from states where state_name = 'BigState')