Created
February 22, 2014 02:31
-
-
Save drobison/9147755 to your computer and use it in GitHub Desktop.
Revisions
-
drobison created this gist
Feb 22, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ SELECT p.id FROM Posts as p JOIN ( SELECT id , MAX(date_modified) as ModifiedDate FROM Posts GROUP BY user_id ) lastPost ON p.id = lastPost.id AND p.date_modified = lastPost.ModifiedDate order by p.user_id