Message-Id: <10533.109712@fatcity.com> From: "salu Ullah" Date: Mon, 19 Jun 2000 14:40:21 GMT Subject: Query - 2nd Request Pls Help Hello I have a table with columns & data as follows cust_id item_code purc_date status 0001 AAAA 01-JAN-00 A 0001 AAAA 02-JAN-00 A 0001 AAAA 03-JAN-00 A 0001 AAAA 04-JAN-00 B 0001 AAAA 05-JAN-00 B 0002 BBBB 05-JAN-00 A 0001 AAAA 06-JAN-00 A 0002 BBBB 06-JAN-00 A 0001 AAAA 07-JAN-00 A . . . . . . . . 0001 AAAA 29-JAN-00 A 0001 AAAA 30-JAN-00 B 0001 AAAA 31-JAN-00 B I'am looking for a query that will give the folllowing result: cust_id item_code status from_date to_date 0001 AAAA A 01-JAN-00 03-JAN-00 0001 AAAA B 04-JAN-00 05-JAN-00 0002 BBBB A 05-JAN-00 06-JAN-00 0001 AAAA A 06-JAN-00 29-JAN-00 0001 AAAA B 30-JAN-00 31-JAN-00 I tried using min(purc_date) & max(purc_date) & grouping them with the remaining columns, but was not getting the desired output. Any input will be appreciated. Thanks in advance Salu ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com