我有这个 sql 查询,我必须提供 ID 才能工作(在这个例子中是 100)
SELECT * FROM students_subjects WHERE student_id
NOT IN
(SELECT student_id FROM students_info WHERE class_id=(SELECT class_id FROM groups WHERE group_id=(SELECT group_id FROM teacher_groups_subjects WHERE t_g_s_id=**100**)))
我想从表 teacher_groups_subjects 中选择所有行并为每个 ID (t_g_s_id) 运行上面的查询
任何人?