I have a table of tags and want to get the highest count tags from the list.
Sample data looks like this
id (1) tag (\'night\') id (2) tag (\'awesome
MySQL prior to version 5 did not allow aggregate functions in ORDER BY clauses.
You can get around this limit with the deprecated syntax:
SELECT COUNT(id), `Tag` from `images-tags` GROUP BY `Tag` ORDER BY 1 DESC LIMIT 20
1, since it's the first column you want to group on.