Results 1 to 4 of 4
  1. #1
    RocketMan is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Location
    New Zealand
    Posts
    1

    Display only best laptimes in query

    I have a database with a table of individual laptimes for different cars and different circuits with different weather conditions.
    I have created a query that lists the fastest times for a car on a certain circuit, and a query for the fastest times on a circuit by different cars.
    When I run these queries they list all the times for the specific car on the circuit, while I just wish for it to list the quickest time for the car in the different weather conditions. Also, I want to create a query that enables me to list the quickest times for each individual car on a certain circuit.
    My table/queries have the fields - Date, Circuit, Make, Model, Weather, Time (minutes), Time (seconds).


    I hope this isn't a stupid question. I'm pretty new to Access (but keen to learn more), so any help is much appreciated.
    Thanks.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    See if this gets you started:

    http://allenbrowne.com/subquery-01.html#TopN
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    Hi,
    first make sure that minutes and seconds are both together in 1 date/time field, then use a groups query:

    select Date, Circuit, Make, Model, min(TimeField)
    from [YourTableField]
    group by Date, Circuit, Make, Model;

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

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

Similar Threads

  1. Display Query
    By jamesfranklin in forum Queries
    Replies: 5
    Last Post: 02-24-2013, 11:26 PM
  2. Replies: 8
    Last Post: 10-22-2012, 07:43 PM
  3. query to display last four entries
    By mejia.j88 in forum Queries
    Replies: 2
    Last Post: 04-18-2012, 05:25 PM
  4. VBA code to display value from SQL query
    By agent- in forum Programming
    Replies: 9
    Last Post: 05-05-2011, 03:52 PM
  5. Display Query Name
    By jgelpi16 in forum Programming
    Replies: 7
    Last Post: 07-20-2010, 08:46 AM

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