Results 1 to 5 of 5
  1. #1
    stormchaser is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    3

    Query to average between two dates.

    Hi, I'm new to access and now i have to make some project for school and I got to create a video archive, thats ok I did that but now here comes the hard part i have to make a query to show me the average days that a movie has been hold and a query that shows wich is the most popular actor..
    what function should i use to do that? (p.s sorry for my bad english )

  2. #2
    DanB is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    5
    Try this:

    Code:
    SELECT AVG( [Date_OUT]-[Date_RETURN]) AS Average_Out
    FROM [YOUR TABLE NAME HERE];

  3. #3
    stormchaser is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    3
    Yes i got this one now the only thing i got left to do is to determine the most wanted movie and actor wich function should i use?

  4. #4
    DanB is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    5
    This should get you started...

    Code:
    SELECT Title, Count(*) AS Popular
    FROM [YOUR TABLE NAME HERE]
    GROUP BY Title
    ORDER BY Count(*) DESC;

  5. #5
    stormchaser is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    3
    yes i did it all thank you for your help and time

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

Similar Threads

  1. Average Query
    By Lorlai in forum Queries
    Replies: 3
    Last Post: 07-21-2011, 10:11 AM
  2. changing average Query
    By joebox8 in forum Queries
    Replies: 1
    Last Post: 06-27-2011, 02:12 AM
  3. SQL query for average (2 tables)
    By JoshD in forum Queries
    Replies: 5
    Last Post: 04-13-2011, 06:12 AM
  4. Replies: 13
    Last Post: 05-28-2010, 11:57 AM
  5. Rounding the Average in a Query
    By jakelufkin in forum Access
    Replies: 3
    Last Post: 06-19-2009, 08:31 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