The latest entry can be determined by a unix timestamp on table A but my queries seems to be failing. I'm trying to use this at the moment but it selecting all rows from table B on the join, not just the one with the highest unix timestamp.
Code: Select all
select max(b.timestamp), a.*
from tableA as a, tableB as b
where a.id = b.backupID
and a.customer != 'APT'
and b.apt = 'n'
group by b.timestamp