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 -> Re: select most recent distinct of a composite value

Re: select most recent distinct of a composite value

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sat, 29 Jul 2006 08:04:58 +0200
Message-ID: <44cafa8b$0$29876$626a54ce@news.free.fr>

"Gregory Bloom" <Gregory.Bloom_at_gmail.com> a écrit dans le message de news: 1154126747.129541.309740_at_h48g2000cwc.googlegroups.com...
|I have a (huge) table with 30 columns, and three of those columns are
| AREA_CODE, PREFIX, STATION, while another column is BILL_DATE. I want
| to select only the records having the most recent BILL_DATE for each
| distinct phone number (where phone number is a composite of
| AREA_CODE+PREFIX+STATION). What would be the most efficient way?
|

Have a look at rank/dense_rank analytic functions.

Regards
Michel Cadot Received on Sat Jul 29 2006 - 01:04:58 CDT

Original text of this message

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