取每種性別的 第一個學生:
select * from student where student_id in(Select min(student_id) FROM student group by sex)
數(shù)據(jù)庫student表:

Snip20190114_3.png
查詢結果:

Snip20190114_2.png
取每種性別的 第一個學生:
select * from student where student_id in(Select min(student_id) FROM student group by sex)
數(shù)據(jù)庫student表:
查詢結果: