Guest User

Untitled

a guest
May 26th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. SELECT habari__postinfo.value, count(habari__posts.id) from habari__posts
  2. INNER join habari__posttype on habari__posts.content_type = habari__posttype.id and habari__posttype.name = 'page'
  3. inner join habari__postinfo on habari__posts.id = habari__postinfo.`post_id` and `habari__postinfo`.name = 'year'
  4. INNER JOIN habari__poststatus on habari__posts.status = habari__poststatus.id and habari__poststatus.name = 'published'
  5. group by habari__postinfo.value
  6. ORDER BY habari__postinfo.value DESC
Add Comment
Please, Sign In to add comment