I'm trying to count the total points outside of a buffer zone using PostgreSQL. The intention is to find all of the schools that do not fall within a 2 mile radius to libraries.
I've either gotten results that return the total number of schools or nothing at all.
What is wrong with my query?
SELECT ST_Buffer(mdlibrary.geom, 3218, 'endcap = round join = round') AS librarybuffer, mdlibrary.anchorname AS libraryname, count(mdschool.*) AS totalschools FROM mdlibrary, mdschool WHERE mdschool.geom IS NULL GROUP BY mdlibrary.geom, mdlibrary.anchorname