RE: [PHP] MySQL query for average records per day OT
| From: | Jay Blanchard | Date: | Thu, 16 Sep 2004 20:00:04 +0000 |
| Subject: | RE: [PHP] MySQL query for average records per day OT | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-196906@lists.php.net to get a copy of this message | ||
[snip]
> You can't get the average and a count in the same query
Sure you can.
mysql> select count(number), avg(number) from numbers;
+---------------+-------------+
| count(number) | avg(number) |
+---------------+-------------+
| 18 | 2.3889 |
+---------------+-------------+
1 row in set (0.00 sec)
[/snip]
If it is numbers you can, but the OP wanted to average for dates.