Answer the question
In order to leave comments, you need to log in
How to merge records with same columns by expanding time range??
How to merge records with same columns by expanding time range??
Table example.
| id | date_from | date_to | param1 | param2 |
|
_
_
_
_
_
_ id | date_from | date_to | param1 | param2 |
1 2009 2012 'A' 'A'
1 2013 2014 'B' 'B' 1 2015
2018
'A' 'A'
dense_rank() over(partition by id order by param1, param2) as rnk,
*
from
Table
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question