Results 1 to 4 of 4
  1. #1
    mikesal57 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    48

    Max Function help...

    Hi Guys....



    I need a query that will ONLY show the TOP Figure from the MIKE Column for each TRACK and RACE Number.....( there are 20 TRACK names and an average of 9 RACES for each)
    I believe its the MAX function but I cant figure how to use it with the other criteria's

    Thxs

    In this example I need..... #6 in Race 1......#3 in Race 2......#5 in race 3...etc...etc

    Click image for larger version. 

Name:	Capture.JPG 
Views:	24 
Size:	137.9 KB 
ID:	45173

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    You need an aggregate query - something like

    SELECT tTRK, nRace, Max(Mike) as MaxMike
    FROM YourTableName
    GROUP BY tTRK, nRace
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    mikesal57 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    48
    Quote Originally Posted by Minty View Post
    You need an aggregate query - something like

    SELECT tTRK, nRace, Max(Mike) as MaxMike
    FROM YourTableName
    GROUP BY tTRK, nRace
    Thxs Minty...Worked like a charm after understanding how its done

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,795
    Or if you want to pull the entire record, for one method review http://allenbrowne.com/subquery-01.html#TopN
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 15
    Last Post: 10-17-2018, 09:26 PM
  2. Replies: 15
    Last Post: 05-31-2017, 02:10 PM
  3. Replies: 2
    Last Post: 02-26-2017, 11:31 AM
  4. Replies: 3
    Last Post: 03-04-2016, 10:36 AM
  5. Replies: 8
    Last Post: 01-31-2014, 01:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums