找出班級裏面男同窗和女同窗數量相同的班級

select class_id from t_class t group by class_id having sum(decode(t.sex, 'male', 1, 'female', -1, 0)) = 0; select * from t_class; select male.cid, female.cid from (select t1.class_id cid, count(1
相關文章
相關標籤/搜索