I have queried my database with the following:
SELECT tlblocation.id, tlblocation.geom
FROM "Municipalities_NL", tlblocation, tlbvenueactiveperiod
WHERE st_within(tlblocation.geom, "Municipalities_NL".geom)
AND "Municipalities_NL".gemeentena::text = 'Amsterdam'::text
AND tlbvenueactiveperiod.date_opened::text >= '1900-01-01'::text
AND tlbvenueactiveperiod.date_opened::text <= '1910-01-01'::text;
How do I add the output table to QGIS?
Vince
20.5k16 gold badges49 silver badges65 bronze badges
-
gis.stackexchange.com/questions/54738/…Stewart Macdonald– Stewart Macdonald2023年02月25日 02:03:24 +00:00Commented Feb 25, 2023 at 2:03
1 Answer 1
You can use
- PostgreSQL execute and load SQL
This algorithm performs a SQL database query on a PostGIS database connected to QGIS and loads the query results as a new layer.
- Or check the box "Load as new layer" in DB Manager
answered Mar 13, 2022 at 13:23
lang-sql