--Original Message-
I have a table where the date a record was added is recorded in the
date column. I can get count of how many records were entered on each
day by doing this
SELECT COUNT(*)
FROM table
GROUP BY date;
I can get a total number of records by doing
I have a table where the date a record was added is recorded in the date
column. I can get count of how many records were entered on each day by
doing this
SELECT COUNT(*)
FROM table
GROUP BY date;
I can get a total number of records by doing
SELECT COUNT(*)
FROM table
but how do I find the
How about
SELECT @total:=COUNT(*) FROM table;
SELECT date, COUNT(*)/@total AS average
FROM table GROUP BY date;
Michael
Chris W wrote:
I have a table where the date a record was added is recorded in the date
column. I can get count of how many records were entered on each day by
doing