Issue:
I have calculated the distance from shore from point data showing dolphin IDs to the coastline by using these commands:
Step 1: Digitise the country lines for administration country shapefiles into line data
Vector - Geometry tools - Polygons to Lines
Step 2: Turn the line data into point data
Vector - Geometry tools - Extract Vertices
Step 3: Calculate the distance to the coast
Processing tools - Toolbox - Distance to nearest Hub
Now I have two attribute tables. The first attribute table is my point data showing dolphin IDs', and the second attribute table shows the 'Hubdistance' from the ' dolphin ID' to the coastline.**
Both attribute tables have two columns in common called 'FID' and 'ID'. I would like to export all the data eventually into a .csv file, hence this is why I would like all of my fields to be in one attribute table.
Does anyone know how I can join the column Hubdistance (line data attribute table) to my attribute table showing point data for my dolphin IDs?
Line data attribute table showing Hubdistance:
Both attribute tables have fields fid and id in common.
The shapefile attribute table showing dolphin IDs
SELECT d.*, h.* FROM "dolphin" AS d LEFT JOIN "hubdistance" AS h ON d.FID||d.ID = h.FID||h.ID;