the right answerFor example,
Item_id option_id is_correct
Questions 1 a f
Item 1 b f
Questions 1 c f
Questions 1 d t
Item 2 a f
Item 2 b f
Questions 2 c f
Questions 2 d f
Please find questions 2
CodePudding user response:
select distinct item_id from t_ems_item_option
Where item_id not in (select item_id from t_ems_item_option where is_correct=true)
CodePudding user response:
The select item_idThe from t_ems_item_option
Where item_id not exists
(select item_id from t_ems_item_option where is_correct=true)
Group by 1;