Skip to content

Instantly share code, notes, and snippets.

@maietta
Created July 17, 2017 19:41
Show Gist options
  • Save maietta/63ed80e698275ab6e47599a489cb2857 to your computer and use it in GitHub Desktop.
Save maietta/63ed80e698275ab6e47599a489cb2857 to your computer and use it in GitHub Desktop.
SQL: Select unique column along with count of each
SELECT
page_size,
COUNT(1) AS `count`
FROM
pdf_inventory
GROUP BY
page_size
ORDER by count DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment