假设表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
假设表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
转载于:https://www.cnblogs.com/zuopy/p/7777461.html