對,我自己試出來了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;