Bug in SQL can you help?
| From: | JJ Harrison | Date: | Tue, 09 Jul 2002 11:37:16 +0000 |
| Subject: | Bug in SQL can you help? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-20422@lists.php.net to get a copy of this message | ||
Here is my SQL(used in a PHP script so this isn't ot)
SELECT
extract(year FROM time),
extract(month FROM time),
count(*) as monthly_views,
time
FROM
tececo_stats
group by
extract(year FROM time),
extract(month FROM time)
order by
monthly_views desc
limit 1
the problem is that is counts the number of rows in the whole thing not the
echoed row. How can I get it count the best days only?
--
JJ Harrison
webmaster@tececo.com
www.tececo.com