I'm using PostgreSQL/PostGIS and I have an advanced type of query.
My database contains two types of object - let's say pubs and churches :)
Is there a way that I can find the area with the densest concentration of pubs compared to churches, and vice versa?
I can obviously display this visually with a heatmap, but I just wondered if there was a programmatic way to do this with PostgreSQL? Perhaps the point that is closest to the most churches relative to pubs?
Thanks.