I am trying to find the number of animals each state has. I first did this query:
COUNT(*) from animals c, locations a where st_contains(a.geom,c.the_geom);
But for some reason I get a syntax error. Can someone guide me in the right direction?
Below are examples of my two tables.
animal_type city area the_geom 9 243582 82F4100000000F0BB0D41 4 11234 6C892E410000000040170 3 243582 82F4100000000F0BB0D41 12 11234 6C892E410000000040170
State gid geom WV 3 82F4100000000F0BB0D41 TX 2 6C892E410000000040170