Averages in queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having some problems in my queries.

I have a list of dates, and i'm trying to find the cumulative average of them in a new column

The problem i am getting though is that instead of finding the average, the new column just displays the number again

For example

Date Queue Averag
20-Dec-03 33 3
21-Dec-03 26 2
22-Dec-03 17 1
23-Dec-03 10 1

when in fact i want it to look like this

Date Queue Averag
20-Dec-03 33 3
21-Dec-03 26 29.
22-Dec-03 17 23.2
23-Dec-03 10 16.62
 
Hi,




SELECT a.Date, AVG(b.queue)
FROM myTable As a INNER JOIN myTable As b
ON a.date>=b.date
GROUP BY a.Date



Hoping it may help,
Vanderghast, Access MVP





Savita said:
I'm having some problems in my queries.

I have a list of dates, and i'm trying to find the cumulative average of them in a new column.

The problem i am getting though is that instead of finding the average,
the new column just displays the number again.
 
Back
Top