[postgis-users] Can't load aggregation query in qgis - row_number() over() as id

Pietro Rossin pierigis at gmail.com
Thu Mar 27 09:27:38 PDT 2014

Hello all
I need to aggregate geometries and load them in qgis

I made a query like this, without success..

SELECT row_number() over() as id, st_collect(geom) as geom, field3, field4,
field5, field6
  FROM schema.table
  where field6 is not null
  group by 3,4,5,6

Qgis don't load the layer with message:

"layer PostgreSQL not valid - level 1"

Where am I wrong?
Thank you all

View this message in context: http://postgis.17.x6.nabble.com/Can-t-load-aggregation-query-in-qgis-row-number-over-as-id-tp5005981.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

More information about the postgis-users mailing list