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: DISTINCT ON ONE ROW

Re: DISTINCT ON ONE ROW

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 29 Jul 1999 15:36:37 +0100
Message-ID: <933259510.3237.1.nnrp-10.9e984b29@news.demon.co.uk>

Depends on your rules for eliminating
near-duplicates. For the specific example you have given one option would be:

    select name, min(id)
    from tableX
    group by name
    order by min(id);

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

Joerg Leute wrote in message <7npld9$mr9$1_at_news.lf.net>...
>Hi everybody
>
>Suppose i have a table like this
>
>ID Name
>1 Joe
>2 Frank
>3 Frank
>4 Frank
>5 Jack
>
>Is there any way (like distinct) to have a result like this
>
>ID Name
>1 Joe
>2 Frank
>5 Jack
Received on Thu Jul 29 1999 - 09:36:37 CDT

Original text of this message

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