Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    14

    Unanswered: Getting most recent date query, Help

    HI, I have a table with multiple records of inspections, so there are multiples of inspection_num and each has a different date. I only want to extract the most recent inspections? I have an example of the table below.

    Inspection_num Completed_Date

    1000 01/01/04
    1000 04/01/03
    1000 01/01/03
    1003 01/01/04
    1003 02/01/04
    1004 01/01/04

    So I would only like to extract the following:
    1000 01/01/04
    1003 02/01/04
    1004 01/01/04

    Thanks

    Sherriff

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Like this
    Code:
    SELECT Inspection_num, Max(Complete_date)
    FROM tblInspection
    GROUP BY Inspection_num;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •