Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT p.id FROM posts p, comments c, users u, badges b
- WHERE c.postid = p.id
- AND u.id = p.owneruserid AND u.id = b.userid
- AND u.upvotes IN (SELECT MAX(upvotes) FROM users u WHERE u.creationdate > p.creationdate)
- AND EXISTS (SELECT 1 FROM postlinks l WHERE l.relatedpostid > p.id)
- AND (b.name LIKE 'Research Assistant');
Add Comment
Please, Sign In to add comment