From: "Greg Donald" <[EMAIL PROTECTED]>
mysql> select the_date, count(number), avg(number) from dates group by the_date;
+------------+---------------+-------------+
| the_date | count(number) | avg(number) |
+------------+---------------+-------------+
| 2004-01-01 | 3 | 2.0000 |
| 2004-01-02 | 4 | 2.5000 |
| 2004-01-03 | 4 | 3.5000 |
+------------+---------------+-------------+
3 rows in set (0.01 sec)

I say again, I took the request as 1) Number of records per day (which you show, but can ignore the "number" column) and 2) The _overall_ average of those counts, which would be (3+4+4 records) / (3 days) = 3.666 records/day


We're arguing the same point, really, and trying to guess what the OP was after...

---John Holmes...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to