对,我自己试出来了XD,原来where跟in后面的条件是可以成对的,这是我最后的语法,select * from score where(pname,subscore) in (select pname,max(subscore)from score group by pname);不过我还没学到join关键字,我会好好研究一下,感谢!
作者:
clonk (咚)
2017-04-28 15:22:00没看到原来的问题 如果是mysql只要这样就好了select pname,subject,max(subscore) as subscore,idfrom score group by pname order by subscore desc;