Skip to content

Instantly share code, notes, and snippets.

@NeilHanlon
Created July 3, 2014 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeilHanlon/b5d77f25f58d90c96c98 to your computer and use it in GitHub Desktop.
Save NeilHanlon/b5d77f25f58d90c96c98 to your computer and use it in GitHub Desktop.
select root_id from jrridley_circlenew.post where root_id > 0 group by root_id order by count(root_id) DESC, create_date AS a INNER JOIN
(select p.post_id, group_id, parent_id, root_id, concat(u.first_name, ' ' , u.last_name), p.title, content, create_date from jrridley_circlenew.post p inner join jrridley_circlenew.users u on p.user_id = u.user_id)as b on a.post_id = b.post_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment