From: Jens Mildner <[EMAIL PROTECTED]>
> Every year from years.year should be returned along with the
> number of games that have been released in that year...
> Years in which no games were released are returned with a
> gamecount of 1.
This is a side effect of the JOIN syntax. Try this:
SELECT years.year AS yearlist, count(years.year) AS gamecount
FROM years, games
WHERE years.year = games.release_year
GROUP BY years.year
ORDER BY gamecount DESC, yearlist
---
Rodney Broom
Programmer: Desert.Net
Spam filter: sql database
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php