I did a SQL query from a Geopackage with QGIS database manager. The query is correct and it returns me the expected result with it's ID and the GEOM columns. The problem becomes when I load the query as a layer. The software creates the layer but is void as you can see:
Parameters and columns;
Any ideas?