Du kan group by
datoen del af datetime og få maks. for hver dag.
select max(`datetime`)
from tablename
where `datetime` >= date(now())-interval '30' day
group by date(`datetime`)
For at få alle felterne fra tabellen for sådanne rækker, brug
select * from tablename where `datetime` in (
select max(`datetime`)
from tablename
where `datetime` >= date(now())-interval '30' day
group by date(`datetime`)
)