Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Develop analytical/aggregate query sql

950930Feb 23 2015 — edited Feb 24 2015

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

100

17/10/2014 12:30

07999999999

IH1111

200

17/10/2014 13:00

07999999999

IH1111

20

17/10/2014 13:30

07999999999

IH1111

50

17/10/2014 14:00

07999999999

IH1111

100

17/10/2014 14:30

07999999999

IH1111

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

30

17/10/2014 17:30

07999999999

IH1111

30

17/10/2014 18:30

07999999999

IH1111

30

17/10/2014 19:30

07999999999

IH1111

30

output data :

17/10/2014 11:30

07999999999

IH1111

320

17/10/2014 13:30

07999999999

IH1111

150

17/10/2014 14:30

07999999999

IH1111

30

17/10/2014 15:00

07999999999

IH1111

C

60

17/10/2014 16:30

07999999999

IH1111

60

17/10/2014 18:30

07999999999

IH1111

60

Could you please help me to generate query.

thanks in advance.

This post has been answered by AnnEdmund on Feb 23 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2015
Added on Feb 23 2015
10 comments
1,792 views