Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help: SELECT STATEMENT

Help: SELECT STATEMENT

From: JagMan <jagman98_at_home.com>
Date: Tue, 14 Mar 2000 02:02:59 GMT
Message-ID: <38CD9DD3.BFD9378F@home.com>


I have following table:

Switch-colum position-column Time

switchA                On                       1:00
switchA                Off                        2:00
switchD                On                        1:00
switchB                Off                        1:00
switchD                Off                        2:00
switchC                Off                        1:00
switchC                Off                        2:00

=============================

I need following output:
Switch        On-Total    Off-Total
switchA        1                1
SwitchB        0                1
SwitchC        0                2
SwitchD        1                1

==============================

As above the output is grouped by Switch column. I can't figure out how to split position-column into "on-total' and "off-total" columns using SELECT statement.

Thanks in advance!
Manny Received on Mon Mar 13 2000 - 20:02:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US