Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    3

    Unanswered: Getting averages in between dates

    Hi,
    I have a little problem. I have a table which contains hourly rain levels for 365 days for 5 years....
    Is it possible to get a query to get the daily average rain level for just one year???

  2. #2
    Join Date
    Dec 2003
    Posts
    268

    Between

    In you criteria for the query put in between #date1# and #date2#
    Then do your avg as usual.

  3. #3
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: Getting averages in between dates

    Originally posted by cobs
    Hi,
    I have a little problem. I have a table which contains hourly rain levels for 365 days for 5 years....
    Is it possible to get a query to get the daily average rain level for just one year???
    I assume that your hourly intervals have a date associated with them.

    You could use a totals query and group by the day. Use the suggestion of mjweyland and restrict the dates to what you want. Sum the values by date and then compute an average. You can most easily do this with 2 queries by computing the Sum grouped by the date in the first query and then do the average in the next query.

    One SQL statement could also do this but my brain doesn't think that fast and lunch is over.

    Hope this helps.
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

Posting Permissions

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