Does anyone have any insight on this? (I tried selecting avg(count(user) but
that didn't work :( )
select user, modified, count(user) as count from db where user='graemed' group
by modified;
+--------+------------+------------+
| count | user | modified |
+--------+------------+------------+
| 20 | graemed | 1999-02-01 |
| 17 | graemed | 1999-02-02 |
| 5 | graemed | 1999-02-03 |
| 24 | graemed | 1999-02-04 |
etc...
I want to get a AVG/MIN/MAX of the count column over all the rows.
Ideas?
Thanks!
Graeme
-----Original Message-----
From: Graeme B. Davis <GraemeD@stripped>
To: mysql@stripped <mysql@stripped>
Date: Monday, March 15, 1999 9:47 AM
Subject: Using avg, min, max functions on a non-numeric field.
>I have a database such as:
>
>user (char)
>category (char)
>modified (date)
>
>I want to get the average number of entries per day (possibly broken down by
>category, but not necessary) -- how would I do this?
>
>I want this to be done with all users in the db such as
>
>user average entries
> min, max
>------- --------------- -------------
>johndoe
> 43 8,93
>
>Any suggestions?
>
>Graeme "SQL bum" D. :)