我有一张桌子叫作稿
BOOKID AUTHORID BOOKNAME GENRE NOOFCOPIES AMOUNT
B105 A102 Diagnosis Journal 500 10000
B102 A102 The Essence... Fiction 110 11000
B106 A102 Clinical Sci. Educat. 125 18750
B104 A103 Mind Games Fiction 200 20000
B100 A102 Sublime Fiction 100 10000
B101 A105 C Programming Educati 125 18750
B103 A101 Scribe Journal 500 10000
B107 A101 Clinical Chem. Educat. 125 54646
B108 A103 Clinical Chem. Educat. 125 54646
如何获取已支付最高金额的 AuthorId?如果我写
select distinct a.AuthorId,m.amount
from Author a,manuscripts m
where m.amount in (select max(amount)
from manuscripts m
where a.AuthorId=m.AuthorId)
然后我能够得到正确的输出,但如果我添加 bookname 那么它不会正确产生..