declare @t table(name varchar(),qy varchar(),je int) insert into @t union all union all union all union all union all --select * from @t a where not exists --这是取表中的NAME相同的最大值 --( -- from @t where name=a.name and je>a.je --) --第一个答案: SELECT NAME,QY,JE…