select album_id, client_id, lag(client_id) over (partition by album_id order by submit_ts asc) lag_client_idfrom stat.submit_factwhere album_id = 440556
In this query, I did not put a 'order by' at the end of the query. But because I use lag function, it will make the whole query order by submit_ts. It makes sense.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment