After successfully running an SQL query on two tables and some results in 3 columns, I would really like to be able to display it in the canvas. Apparently, that function is not doing anything, not even as much as throwing an error so as to know if something is happening.
What should I do? Hopefully this screenshot will help.
*I'm using the DB manager because the SPIT plugin was not allowing me to import shapefiles. *QGIS version 2.8.2 on Windows
After several attempts, I managed to create a table with my results, however it's not what I was aiming for.
create table results as (SELECT bati_1948.objectid gid48,bati_1971.objectid gid71,ST_Area(ST_Intersection(bati_1948.geom,bati_1971.geom))/ST_Area(bati_1971.geom) ratio FROM bati_1948 RIGHT JOIN bati_1971 ON ST_DWithin(bati_1948.geom,bati_1971.geom,5) WHERE bati_1948.objectid IS NULL OR ST_Area(ST_Intersection(bati_1948.geom,bati_1971.geom))/ST_Area(bati_1971.geom)<>1);
Would anyone know how could I turn this into a shapefile?