select * from(select id, idkey,ROW_NUMBER() over(partition by id order by idkey desc)as num from Sample) as aawhere aa.num<=5 order by id
Copyright @ 2024 lsyyx Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster