Hi ,
I need to transform the input data as below :
as the value of category chnages , the summation needs to be done as per date values.
Date | Number | CODE
| CATEGORY | VALUE |
17/10/2014 11:30 | 07999999999 | IH1111 | A | 100 |
17/10/2014 12:30 | 07999999999 | IH1111 | A | 200 |
17/10/2014 13:00 | 07999999999 | IH1111 | A | 20 |
17/10/2014 13:30 | 07999999999 | IH1111 | B | 50 |
17/10/2014 14:00 | 07999999999 | IH1111 | B | 100 |
17/10/2014 14:30 | 07999999999 | IH1111 | A | 30 |
17/10/2014 15:00 | 07999999999 | IH1111 | C | 30 |
17/10/2014 15:30 | 07999999999 | IH1111 | C | 30 |
17/10/2014 16:30 | 07999999999 | IH1111 | A | 30 |
17/10/2014 17:30 | 07999999999 | IH1111 | A | 30 |
17/10/2014 18:30 | 07999999999 | IH1111 | B | 30 |
17/10/2014 19:30 | 07999999999 | IH1111 | B | 30 |
output data :
17/10/2014 11:30 | 07999999999 | IH1111 | A | 320 |
17/10/2014 13:30 | 07999999999 | IH1111 | B | 150 |
17/10/2014 14:30 | 07999999999 | IH1111 | A | 30 |
17/10/2014 15:00 | 07999999999 | IH1111 | C | 60 |
17/10/2014 16:30 | 07999999999 | IH1111 | A | 60 |
17/10/2014 18:30 | 07999999999 | IH1111 | B | 60 |
Could you please help me to generate query.
thanks in advance.