I have two layers, one is a grid of circles and the other is all Census Block Groups (CBG) in the state of Florida. I created a Virtual Layer out of this code
SELECT CirclesFlorida.name, group_concat(cbgFl.FIPS)
FROM CirclesFlorida
LEFT JOIN cbgFl ON ST_Intersects(circlesFlorida.geometry, cbgFl.geometry)
GROUP BY circlesflorida.name
The purpose is for each circle to have a data column which lists every CBG that falls in that circle.
Is there a faster way to do this? Maybe DB Manager? Currently the query takes 20 minutes to run and another 5 minutes to just open the attribute table of the Virtual Layer.
asked Sep 28, 2020 at 22:03
lang-sql
_searchframe_
in your query! This helped me: lists.osgeo.org/pipermail/qgis-developer/2021-May/063582.html