Created
May 20, 2010 01:57
-
-
Save ringmaster/407106 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 habari__postinfo.value, count(habari__posts.id) from habari__posts | |
INNER join habari__posttype on habari__posts.content_type = habari__posttype.id and habari__posttype.name = 'page' | |
inner join habari__postinfo on habari__posts.id = habari__postinfo.`post_id` and `habari__postinfo`.name = 'year' | |
INNER JOIN habari__poststatus on habari__posts.status = habari__poststatus.id and habari__poststatus.name = 'published' | |
group by habari__postinfo.value | |
ORDER BY habari__postinfo.value DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment