Skip to content

Instantly share code, notes, and snippets.

@fideloper
Created March 19, 2014 14:24
Show Gist options
  • Save fideloper/9642664 to your computer and use it in GitHub Desktop.
Save fideloper/9642664 to your computer and use it in GitHub Desktop.
sql_query = SELECT topic_id, topic FROM topics
# joined/payload field fetch query
# joined fields let you avoid (slow) JOIN and GROUP_CONCAT
# payload fields let you attach custom per-keyword values (eg. for ranking)
sql_joined_field = post from query; \
SELECT topic_id, post \
FROM posts \
ORDER BY topic_id ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment