Showing Average Visitors Per day

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[I apologize if this comes through twice, the first time I sent it did not
appear to go through]

My problem is what I am trying to show the average number of visitors I am
getting on a daily basis over a given month.  So for example, I would like
to be able to display the average number of visitors that came to my web
site on a Monday.

Included below is the table I am working with, also below there is the SQL
statement I am trying to work with to produce the results.

I have worked out how to show how many total visited my site on a Monday,
but I cannot work out how to (a) show how many Monday's (for example) there
were in a given month and therefore (b) how to turn the totals into an
average.

CREATE TABLE `stat` (
  `statid` int(11) NOT NULL auto_increment,
  `stat01` varchar(100) default '',
  `stat02` varchar(100) default '',
  `stat03` datetime default '0000-00-00 00:00:00',
  PRIMARY KEY  (`statid`)
) TYPE=MyISAM;

select count(weekday(stat03)) AS dayname from stat where and
date_format(rms03,'%m %Y') = '09 2003' and weekday(stat03) = '0'

I hope this is a simple question, I've googled for over an hour and I'm
drawing blanks.

Thanks!

Phil Dowson

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux