I have the following two select statements:
SELECT ts,max FROM aggregates WHERE name like '3B-HP-DRM-SKIN-1-T' AND ts between '14-JUN-06 08:32' AND '14-JUN-06 22:26';
SELECT ts,max FROM aggregates WHERE name like '3B-HP-DRM-SKIN-2-T' AND ts between '14-JUN-06 08:32' AND '14-JUN-06 22:26';
(note difference is in the name - skin-1 and skin-2)
Rather than display these in one line like so:
Skin 1
ts max
-------------------- --------------
14-JUN-06 08:33:00.0 566.632
14-JUN-06 08:34:00.0 567.24
14-JUN-06 08:35:00.0 568.62
14-JUN-06 08:36:00.0 569.921
14-JUN-06 08:37:00.0 570.814
14-JUN-06 08:38:00.0 571.274
Skin 2
14-JUN-06 08:33:00.0 567.536
14-JUN-06 08:34:00.0 568.507
14-JUN-06 08:35:00.0 569.452
14-JUN-06 08:36:00.0 570.463
14-JUN-06 08:37:00.0 571.306
14-JUN-06 08:38:00.0 571.788
I need them side by side like this:
ts skin1 max Skin2 max
-------------------- -------------- --------------
14-JUN-06 08:33:00.0 566.632 567.536
14-JUN-06 08:34:00.0 567.24 568.507
14-JUN-06 08:35:00.0 568.62 569.452
14-JUN-06 08:36:00.0 569.921 570.463
14-JUN-06 08:37:00.0 570.814 571.306
14-JUN-06 08:38:00.0 571.274 571.788
I'm thinking some type of join should be used here.
Dave
SELECT ts,max FROM aggregates WHERE name like '3B-HP-DRM-SKIN-1-T' AND ts between '14-JUN-06 08:32' AND '14-JUN-06 22:26';
SELECT ts,max FROM aggregates WHERE name like '3B-HP-DRM-SKIN-2-T' AND ts between '14-JUN-06 08:32' AND '14-JUN-06 22:26';
(note difference is in the name - skin-1 and skin-2)
Rather than display these in one line like so:
Skin 1
ts max
-------------------- --------------
14-JUN-06 08:33:00.0 566.632
14-JUN-06 08:34:00.0 567.24
14-JUN-06 08:35:00.0 568.62
14-JUN-06 08:36:00.0 569.921
14-JUN-06 08:37:00.0 570.814
14-JUN-06 08:38:00.0 571.274
Skin 2
14-JUN-06 08:33:00.0 567.536
14-JUN-06 08:34:00.0 568.507
14-JUN-06 08:35:00.0 569.452
14-JUN-06 08:36:00.0 570.463
14-JUN-06 08:37:00.0 571.306
14-JUN-06 08:38:00.0 571.788
I need them side by side like this:
ts skin1 max Skin2 max
-------------------- -------------- --------------
14-JUN-06 08:33:00.0 566.632 567.536
14-JUN-06 08:34:00.0 567.24 568.507
14-JUN-06 08:35:00.0 568.62 569.452
14-JUN-06 08:36:00.0 569.921 570.463
14-JUN-06 08:37:00.0 570.814 571.306
14-JUN-06 08:38:00.0 571.274 571.788
I'm thinking some type of join should be used here.
Dave