Hey guys i need your help for create a new field in my table.
I have this table and the action to do in the column TO DO
%ID | %sec | DATE_FROM | DATE_TO | TYPE | Filter | TO DO |
26341460 | 34 | 27/02/2015 | | A | only one A | |
26341460 | 33 | 27/02/2015 | | A | - | take min (DATE_FROM) for same %ID and same %sec |
26341460 | 33 | 29/02/2016 | | A | multiple A | delete row |
26341460 | 26 | 29/12/2014 | | A | | |
26341460 | 30 | 01/03/2015 | | A | | |
26341460 | 23 | 29/12/2014 | | A | | take date_to from TYPE C and delete row with type C |
26341460 | 23 | 29/02/2016 | | C | | delete row |
I need to create a new table like this
%ID | %sec | DATE_FROM | DATE_TO |
26341460 | 34 | 27/02/2015 | today () |
26341460 | 33 | 27/02/2015 | today () |
26341460 | 26 | 29/12/2014 | today() |
26341460 | 30 | 01/03/2015 | today() |
26341460 | 23 | 29/12/2014 | 29/02/2016 |
Thanks!