Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select most recent distinct of a composite value
"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