select * from question where question.user_id = user_id
and (select count(*) from answer where answer.question_id = question.id) = 0
Question::find()->where(['user_id' => user_id]) ....
An active query to find each question for a given user with no answer.
Question::find()->leftJoin('answer', 'answer.question_id=question.id') ->where(['question.user_id' => $user_id]) ->andWhere(['answer.id' => null)