Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    266

    Unanswered: SELECT DISTINCT on last date

    Hello I am having a MS Access 2000 Table

    Table1
    id (autoincrement) | id_users (integer) | LastVisit (date)

    i want to get id, id_users, lastVisit

    to get a list of each users (distinct) for the lastvisit (max(date))

    thank you

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    select distinct id_users
      from Table1
     where LastVisit =
           ( select max(LastVisit) from Table1 )
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2005
    Posts
    266
    thank you r937

Posting Permissions

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