Skip to content

Instantly share code, notes, and snippets.

@rubypirate
Created January 22, 2013 14:23
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 rubypirate/4594992 to your computer and use it in GitHub Desktop.
Save rubypirate/4594992 to your computer and use it in GitHub Desktop.
Question.find_by_sql("SELECT t1.* FROM questions t1 LEFT JOIN questions_options t2 ON t1.id = t2.question_id WHERE t2.question_id IS NULL AND t2.user_id != 1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment