I have a spatial layer which I did a JOIN tool with a data table. Now in my attributes window I see all the fields: the original ones and the ones from the joined table.
Both are in a PostgreSQL database but when I create a virtual layer with a SQL query that fetches a column of the joined table, QGIS gives an error: there is no column "x" used in the query.
Is there any solution without definitively joining the layer with the table?
I am using QGIS 3.20 and Postgres 14.