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.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.