Created
December 12, 2014 03:47
-
-
Save alpha1/7dd932a91707295d9e3e to your computer and use it in GitHub Desktop.
MYSQL: Get Counts for each unique value in a single column in a single tablet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT `Column1`,`Column2`,COUNT(*) as count FROM `TABLE` GROUP BY `COLUMN1` ORDER BY `X` ASC, `count` DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment