Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Something like this:
select * from (
select
*,
date(from_unixtime(created_at)) created_date,
row_number() over (partition by created_date order by created_at desc) rn
from tbl) row_numbers where rn = 1
select tbl.* from tbl
join (
select max(created_at) max_created_at
from tbl
group by date(from_unixtime(created_at))
) last_time on last_time.max_created_at = tbl.created_at;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question