Created
January 27, 2017 23:48
-
-
Save AMD-NICK/94dcba281a3292755e150c699e5480c3 to your computer and use it in GitHub Desktop.
MySQL GROUP BY несколько колонок
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 CONCAT(`type`, "-", `value`) AS `group`, COUNT(*) AS `total` | |
FROM `trigon_don_purchases` | |
GROUP BY `group` | |
ORDER BY `total` DESC | |
LIMIT 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment