Not sure if this is possible in a single query but looking to do this directly in SequelPro.
I have a table containing cars, and if they are sold or live.
I also have another table which is called data_store and contains some information about those cars. However, not all of the cars have data in this table.
To get the cars that are live is currently:
SELECT * from cars where `sale_status` = 'live'
I now need it to be like:
SELECT * from cars where `sale_status` = 'live' AND THERE IS A ROW IN THE DATA_STORE TABLE FOR THIS CARS REGISTRATION NUMBER.
There is a registration number field in each of the tables.
Thanks, still getting my head around joins.