Posted by: lazyketa November 29, 2018
Questions to SQL Gurus
Login in to Rate this Post:     0       ?        
Before even going to the solution you have to make sure that you have to have a sorting (order by) criteria to get consistency in getting first or last row. Not going to give you a complete SQL statement but to solve this problem you can use RANK.
Read Full Discussion Thread for this article