Hi,
You may try:
SELECT S.siteName, V.siteIP, MAX(H.date) Date, S.siteName + H.date
FROM sites S
left JOIN history H ON S.siteName = H.siteName
left join value V on V.sitename = S.sitename
Group BY S.siteName, V.siteIP
UNION
SELECT '', '', H.date, S.siteName + H.date
FROM sites S
left JOIN history H ON S.siteName = H.siteName
left join value V on V.sitename = S.sitename
ORDER BY S.siteName + H.date
Even though you can see an additional column, the last column will not be exported because there is no title.
Thanks,
Gordon