Hi I have this table:
TRS_NO | SEQUENCE | DATE | AMOUNT | STATUS | AccountNo |
101 | 10011 | 1/14/2020 | 1000 | POSITIVE | 1001 |
102 | 10012 | 1/17/2020 | 400 | NEGATIVE | 1001 |
103 | 10013 | 1/22/2020 | -1600 | POSITIVE | 1001 |
108 | 10014 | 1/29/2020 | -6600 | NEGATIVE | 1001 |
109 | 10015 | 1/29/2020 | 4000 | POSITIVE | 1001 |
110 | 10016 | 2/15/2020 | -10 | NEGATIVE | 1001 |
If we have 2 change status is same date we should take max(sequence)
From 1/14/2020 to 1/16/2020 : POSITIVE --> 3 days
From 1/17/2020 to 1/21/2020 : NEGATIVE --> 5 days
From 1/22/2020 to 2/15/2020 : POSITIVE --> 25 days
And i want to display a chart ( line, bar ....) any type of chart, like this one:
