SELECT
FROM
STUDENT
A
LEFT
JOIN
SCORE
B
ON
A.学号=B.学号
WHERE
A.性别='女'
select score,sex,name,count(*) from table group by sex order by score descscore 分数 sex性别 name名字
---------------------------------------------------------
select score,sex,name,max(score) from table group by sex这样试试?或者你union all试试
select name,sex,score from table where sex='f' order by score desc union allselect name,sex,score from table where sex='m' order by score desc limit 2
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)