假设表A有三个字段

{

  id int;

  subject varchar(20);

  socre int;

}

语句为 select * from A  x where (select count(*) from A where subject=x.subject and score>=x.score   )<=15

05-12 12:42