When there's no time for best practices
SELECT myField, COUNT(*) AS 'inelegantCount'FROM myTableGROUP BY myField
Hi. I always forget this, too (hence my visit...).Also useful to add isorder by count(*) desc/ascso you can see which value has most/least entries
Thanks, I always forget this, too.
thanks!
Post a Comment
3 comments:
Hi. I always forget this, too (hence my visit...).
Also useful to add is
order by count(*) desc/asc
so you can see which value has most/least entries
Thanks, I always forget this, too.
thanks!
Post a Comment