Changing the results of a complex query or altering the results after they are returned : I have an extremely complex and long query that I did not write and that spans over 14 lines that returns something like this

    |data| fromDateTime       | toDateTime          |
     ------------------------------------------------
    | 2 | 2017-09-08 08:00:00 | 2017-09-08 11:00:00 |
    | 2 | 2017-09-08 08:00:00 | 2017-09-08 11:00:00 |
    | 2 | 2017-09-08 08:00:00 | 2017-09-08 11:00:00 |
    | 3 | 2017-09-08 11:30:00 | 2017-09-08 17:00:00 |
    | 3 | 2017-09-08 11:30:00 | 2017-09-08 17:00:00 |
    | 4 | 2017-09-08 17:00:00 | 2017-09-08 19:00:00 |
    | 4 | 2017-09-08 17:00:00 | 2017-09-08 19:00:00 |
    | 4 | 2017-09-08 17:00:00 | 2017-09-08 19:00:00 |

And I need something like this 

       |data| fromdatetime       | toDateTime          |
         ------------------------------------------------
        | 2 | 2017-09-08 08:00:00 | 2017-09-08 11:00:00 |
        | 0 | 2017-09-08 08:00:00 | 2017-09-08 11:00:00 |
        | 0 | 2017-09-08 08:00:00 | 2017-09-08 11:00:00 |
        | 3 | 2017-09-08 11:30:00 | 2017-09-08 17:00:00 |
        | 0 | 2017-09-08 11:30:00 | 2017-09-08 17:00:00 |
        | 4 | 2017-09-08 17:00:00 | 2017-09-08 19:00:00 |
        | 0 | 2017-09-08 17:00:00 | 2017-09-08 19:00:00 |
        | 0 | 2017-09-08 17:00:00 | 2017-09-08 19:00:00 |

The moral of the story is that the data in the "data" column contains duplicate information that gets summed in a report resulting in bad info I NEED THAT ROW THOUGH I cannot get rid of the row with distinct 

