Re: Begining SQL Question

From: Kenneth Koenraadt <plovmand_at_hotmail.com>
Date: Mon, 05 Mar 2001 18:09:10 GMT
Message-ID: <3aa3d5b1.1630485_at_news.mobilixnet.dk>


Hi George,

SELECT accountnumber, max(Date)
FROM table
group by accountnumber;

  • Kenneth Koenraadt plovmand_at_<no spam>hotmail.com

On Sun, 04 Mar 2001 23:44:34 -0500, George Murnu <gmurnu_at_erols.com> wrote:

>Hello!
>
>This is my first post here, so if this is not the right place, I
>apologize. I am trying to run a query in Oracle and basically I have a
>table with duplicate data. More precisely, my table contains duplicate
>Account Numbers with different dates. So how can I select only one row
>for each account, the one with the latest date for each account? I
>tried :
>
>"Select * from Table group by Date having Date = Max( Date ) but I
>couldn't get it to compile.
>
>Thanks,
>
>George
  Received on Mon Mar 05 2001 - 19:09:10 CET

Original text of this message