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!

Pivot query, but not really

595792Jul 15 2010 — edited Jul 16 2010
Hi, my data looks like this:

NODE TIME_STAMP DURATION_IN_SECONDS
1 16:00:00 2.31
2 16:01:00 1.47
3 16:02:00 1.88
1 16:05:00 1.89
2 16:06:00 3.64
3 16:07:00 3.53
1 16:10:00 3.79
2 16:11:00 1.90
3 16:12:00 3.10
1 16:15:00 4.37
2 16:16:00 3.96
3 16:17:00 1.06
1 16:20:00 1.02
2 16:21:00 4.57
3 16:22:00 1.94
1 16:25:00 1.54
2 16:26:00 2.00
3 16:27:00 3.44
1 16:30:00 1.54
2 16:31:00 1.57
3 16:32:00 1.86

I want to get:
TIME_BLOCK NODE_1_DURATION NODE_2_DURATION NODE_3_DURATION
16:00:00 2.31 1.47 1.88
16:05:00 1.89 3.64 3.53
16:10:00 3.79 1.90 3.10
16:15:00 4.37 3.96 1.06
16:20:00 1.02 4.57 1.94
16:25:00 1.54 2.00 3.44
16:30:00 1.54 1.57 1.86
This post has been answered by Aketi Jyuuzou on Jul 15 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2010
Added on Jul 15 2010
4 comments
1,233 views