Last active
February 17, 2017 20:14
-
-
Save salase/56cc3d65debbd25e5307a8e3db9ee334 to your computer and use it in GitHub Desktop.
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 t.term_id, t.name, count(tr.object_id), t.slug | |
FROM `wp_term_relationships` tr | |
join `wp_term_taxonomy` tt on tr.term_taxonomy_id=tt.term_taxonomy_id and tt.taxonomy='category' | |
join `wp_terms` t on t.term_id=tt.term_id | |
group by t.name | |
order by t.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment