Posted on 2011-10-27
Last Modified: 2012-08-14
Hi All,

I have below data :

Id   Date  
A    01/01/2011
A    02/01/2011
B    01/01/2011
C    01/01/2011
C    02/01/2001

Expected Result :

A    02/01/2011
B    01/01/2011
C    02/01/2001

How could I do it ?

Thank you.

Question by:emi_sastra
    LVL 142

    Accepted Solution

    check this article out:

    you can see how to do it, especially if you need data from more columns ...
    LVL 73

    Expert Comment

    s elect id, max(date) from yourtable group by id
    LVL 1

    Author Comment

    Hi angelIII,

    The article is great.

    Thank you very much for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Title # Comments Views Activity
    Oracle PL/SQL syntax 4 29
    Grouping within groups: SQL 5 29
    SQL Round a percentage 2 13
    phpMyAdmin simple sql statement 3 0
    INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    This video discusses moving either the default database or any database to a new volume.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now