感谢论坛ACCESS版两位版主的指导。帖子链接:http://bbs.youkuaiyun.com/topics/390316494
做一下学习记录:
select InvNo,Model,Amount from dbo_InvoiceDetail a
where 10>(select count(*) from dbo_invoiceDetail b where b.invNo=a.invNo and b.Amount>a.Amount )
order by a.invNo,a.Amount desc
遗留问题,如果invno,model,amount三个字段都重复的多条记录,那么条数会超出10条。