SQL Query (Joining the table to itself)

From: Pavan Muppidi <v919643_at_raven.cid.kodak.com>
Date: 1996/01/25
Message-ID: <4e8rtf$29d_at_thetimes.pixel.kodak.com>#1/1


Hello,

I have a frequency table as shown below.

frequency Thru_Date Status


 Monthly          01-JAN-96         C
 Monthly          01-FEB-96         I
 Monthly          01-MAR-96         I
 Monthly          01-APR-96         I
 Monthly          01-MAY-96         I

I am trying to write a query to give the following result.

Frequency From_Date To_Date


 Monthly          01-FEB-96         01-MAR-96
 Monthly          01-MAR-96         01-APR-96
 Monthly          01-APR-96         01-MAY-96

I tried joining the table to itself using rownums, without much success. Please somebody help me with a idea how to accomplish this.

Thanks in advance

Pavan Muppidi Received on Thu Jan 25 1996 - 00:00:00 CET

Original text of this message