SELECT state, SUM(borks) AS borkcount FROM borkstats WHERE ???????????? GROUP BY state ORDER BY state
In another table like this with month/year fields I once created a dummy date field that I populated with the date of the first of the month (1/<month>/<year>), just to facilitate queries like this. Is there another approach? Can I somehow create that dummy field on the fly within the query itself?
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]