I have a table that has 3 columns. I do not want to repeat the row based on 2 columns that have the same values.
|start_date(date)| end_date(date) |theDiff(integer)
---------------------------------------------------
|2018-05-14 | 2018-05-18 | 5 |
|2018-05-14 | 2018-05-18 | 10 |
---------------------------------------------------
Expected Output:
|start_date(date)| end_date(date) |theDiff(integer)
---------------------------------------------------
|2018-05-14 | 2018-05-18 | 5 |
---------------------------------------------------
I have many such rows and do not want them to repeat. I just want to add their first occurrence. I always want it to output the lower difference.