> I have a table that stores a daily summary of page hits. I need to be able > to summarize this data by month, which I've done with the following query: > > SELECT > MONTHNAME(date) as month, > YEAR(date) as year, > SUM(count) as count > FROM pagehits WHERE date > CURDATE() - INTERVAL 12 MONTH > GROUP BY > YEAR(date), > MONTHNAME(date) > ORDER BY > YEAR(date), > MONTH(date) > > I then need to limit this to the previous 12 months. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php