Q1.2

mail@pastecode.io avatar
unknown
pgsql
2 years ago
344 B
3
Indexable
Never
select
    customer_id, hit_day, page_asin
from
    (select *,
            row_number() over(  partition by customer_id
                                order by
                                    hit_day desc,
                                    hit_datetime_utc) as row_n
        from
            Clickstream) as clickdata
where
    row_n = 1