If I can retrieve the most recent `name` for each `id` from a table in a MySQL database like so:

```
SELECT n.id, n.name, n.date
    FROM $table AS n
INNER JOIN
(SELECT id, MAX(date) AS date
    FROM $table GROUP BY id)
AS max
USING (id, date);

```

How could I retrieve the most recent `name` from three almost identical tables (call them `$table, $table2, $table3`)? They all share the same column structure and the `id` found from one table may or may not be present in the other two. Think of it as one large table split into three (but with two of them containing two extra columns that are irrelevant in this instance). Would `UNION` be the best solution? If so, is there a way to do it without a mile-long query?

---

**Constraint:**

**id is not an auto-incrementing unique integer unfortunately**