Es porque tu primer SELECT
y 2º SELECT
tienen un número variable de columnas, ya que introdujiste Distance
en 2do SELECT
.
Así que intenta hacer Distance
en la primera consulta nulo o 0 de la siguiente manera.
SELECT * FROM
(
SELECT *, 0 as Distance
FROM user u
INNER JOIN employee e ON (u.empid = e.empid)
INNER JOIN awards a ON (u.empid = a.empid)
WHERE u.empid = 123
UNION
SELECT *, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) )+ sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance
FROM user u
INNER JOIN employee e ON (u.empid = e.empid)
INNER JOIN awards a ON (u.empid = a.empid)
HAVING distance < 25
ORDER BY distance
) a
ORDER BY timestamp DESC