Coba gabungan:
SELECT table1.name, temperature, pressure
FROM table1 inner join table2 ON
table1.name = table2.name
UNION
SELECT table1.name, temperature, pressure
FROM table1 inner join table3 ON
table1.name = table3.name
Sunting:Anda dapat memilih lagi dari hasil tersebut, lalu Anda dapat membatasi, mengelompokkan, atau memesan:
SELECT * FROM
(
SELECT table1.name, temperature, pressure
FROM table1 inner join table2 ON
table1.name = table2.name
UNION
SELECT table1.name, temperature, pressure
FROM table1 inner join table3 ON
table1.name = table3.name
) as JoinedTable
LIMIT 0, 1
Sunting 2:Untuk hanya memiliki satu baris dari setiap tabel (tabel 2 dan tabel 3), Anda dapat menggunakan batas/kelompokkan menurut/urutan menurut untuk setiap kueri (dengan asumsi Anda memiliki tanggal kolom):
SELECT table1.name, temperature, pressure
FROM table1 inner join table2 ON
table1.name = table2.name
ORDER BY date DESC
LIMIT 0, 1
UNION
SELECT table1.name, temperature, pressure
FROM table1 inner join table3 ON
table1.name = table3.name
ORDER BY date DESC
LIMIT 0, 1