Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Github Pastebin
SELECT title, content, category, pub_time
FROM news
SELECT count(*) FROM news AS f
WHERE f.category = news.category AND f.pub_time <= news.pub_time
) <= 2;
# Via
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment