JOIN t2 ON (t2.id = t1.id AND t2.date = t1.date)
SELECT *
FROM t1
JOIN t2 USING (id, date)
perhaps you'll need to use INNEER JOIN or where t2.id is not null if you want results only matching both conditions
JOIN t2 ON (t2.id = t1.id AND t2.date = t1.date)
JOIN t2 ON (t2.id = t1.id AND t2.date = t1.date)
SELECT *
FROM t1
JOIN t2 USING (id, date)
perhaps you'll need to use INNEER JOIN or where t2.id is not null if you want results only matching both conditions
Source: Stackoverflow.com