Questions tagged [first-value]
1 questions
2
votes
2 answers
SQL get last column in a group based on order by and value of another column
From the table below, I am trying to create another column (last_k2X) that will show the last key2 where type was set to 'X' over time (ti).
In case X was set at the same time (ts) for multiple key2, (in same key1 partition), the new column last_k2X…

Alg_D
- 2,242
- 6
- 31
- 63