简单方法:
ids = LevelsQuestion.all(:select => "question_id", :conditions => "level_id = 15").collect(&:question_id)Question.all(:select => "id, name", :conditions => ["id not in (?)", ids])
一枪:
Question.all(:select => "id, name",:conditions => ["id not in (select question_id from levels_questions where level_id=15)"])



