how about this: select substr(datetime,0,8) AS date, count(datetime) from userLog group by date;
I could not clearly understand what you wanted to average upon..... HTH, Anoop On 5/6/05, Graham Anderson <[EMAIL PROTECTED]> wrote: > > how do I get the average number of hits per day > > I have a table like: > DateTime id ip > 20050506190723 1 121.198.262 > > what I have so far > SELECT DateTime , count( * ) > FROM userLog > GROUP BY DateTime > LIMIT 0 , 30 > > I assume that DateTime would have to be converted to a specific day > like 2005-3-7 > and somehow I would need to average them > > can a kind soul point me in the right direction > > g > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- Thanks and best regards, Anoop