I have a SQL questions: I want to populate rank for each record as a next up number. However I want to keep the rank same for records for which the adjust values are not same.
Sample data :
# | value | date1 | * rank (expected)
--+-------+------------+-------
1 | A | 05/01/2020 | 1
1 | A | 05/02/2020 | 2
1 | A | 05/03/2020 | 3
1 | B | 05/04/2020 | 3
1 | A | 05/05/2020 | 3
1 | A | 05/06/2020 | 4
1 | A | 05/07/2020 | 5
1 | A | 05/08/2020 | 6
1 | B | 05/09/2020 | 6
1 | A | 05/10/2020 | 6
1 | A | 05/11/2020 | 7
I am looking for best way to populate the 4th column based on the first three.