I need to do a add a column (CTRL) to verify that in each partition (ID) the sequence of the dates (REFERENCE_DATE) is correct keeping in consideration the column NUM_ROLL;
The db is ORACLE and I am using SQL DEVELOPER
enter image description here
I expect to have the new column CTRL having values 0 or 1