Skip to content
Advertisement

SQL Function: Get next value in row

I’m looking for an SQL way to get the value from the next row.

I need output as

I tried to use lead function , last value and rank() all function but no use of it . can any one please help me to achieve above task

Advertisement

Answer

You can’t use Lead because you have a tie. So the next one is actually the same date

SQL DEMO

OUTPUT

enter image description here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement