[data from pgadmin to QGIS]
Hello.
How you can view this query in qgis like maps?
Any ideas? Thanks you very much.
I can see only whole layers, but I don t know how view this query
https://docs.qgis.org/3.10/en/docs/training_manual/databases/db_manager.html?highlight=postgis#basic-fa-executing-sql-queries-with-db-manager
there is a problem with "no geometry"
Your query is missing geometry, you just have "sum".
Adelcides Varela yes, i know. But, how transform it, to make geometry?
Ján Infosuty Šutý can you send me the data?
Adelcides Varela https://gis.fns.uniba.sk/vyuka/gbu/data_nyc.zip
This query is much more efficient (just sum, no geometry):
Ján Infosuty Šutý I'm achieving it using Virtual Layers, I'll keep trying using PostGIS and report the results.
The result:
thank you very much , so you modify query and finally we can see view.
select name, sum (popn_total), st_astext(nyc_neighborhoods.geom) as geom from nyc_neighborhoods, nyc_census_blocks where st_intersects(nyc_neighborhoods.geom, nyc_census_blocks.geom) and name ='The Rockaways' group by name, nyc_neighborhoods.geom;
Adelcides Varela yes, it works.
Ján Infosuty Šutý no need to "create view" just "load layer".
Adelcides Varela yes, I understand. Thank you very much and have a nice day :)