Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Selecting rows as columns
Hi,
I'm trying to generate a select statement. I'll use the following table as an example:
Date Date
Time_Band Varchar2(7)
Calls Number
Time_Band can take three values (Peak, OffPeak, Weekend). I want to query the table and return one row giving the number of calls for each timeband.
eg. :
Peak OffPeak Weekend
2 3 0
I'm sure it should be easy - but I can't figure it out. I would like to do it in one (relatively) simple query if possible.
Thanks for your help.
Mark
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Sep 01 2000 - 10:43:28 CDT