select date_trunc('day',recorded_at) as date, price
from (
select recorded_at, price,
row_number() over (partition by date_trunc('day',recorded_at) order by recorded_at desc) as rn
from public.prices
where asset_id = 7083 --6758 is sushi
and recorded_at > '2020-09-03' and recorded_at <= '2020-10-16'
) t
where rn = 1
order by recorded_at