If I use the following script I can link everything between the two main tables using the race id
SELECT * FROM historic_races join historic_runners using (race_id)
However I am having trouble adding the historical Betfair SP table to these two so I can link the three tables together although I guess that the equivalent of the race_id in the above two tables would be the column sf_race_id in the historic_betfair_win_prices table
I have tried all kinds of things and keep failing so any advice would be appreciated