In QGIS 3.18, I have two data-only layers (csv) - the table
coordinates containing lat/lon values, the table
data containing attribute data. Both tables have a common unique id: 1 (data) : n (coordinates). I now want to visualize the data on the map.
What I tried: I made a table join to add the coordinates to the
data table - that works. Than I created a virtual layer with this query:
select d.field_1, d.field_2, d.field_3, d.field_4, d.field_5,d.field_6, d.coordinates_lat, d.coordinates_lon, make_point(d.coordinates_lon, d.coordinates_lat) as geometry from data as d
This works fine.
Now I would like to do table join in the virtual layer as well. How is the correct syntax to achieve that?
Screenshot: creating point geometries from table join: