34,590
社区成员
发帖
与我相关
我的任务
分享
select * from question a
where a.id in (select top 5 id from question b where a.typeid=b.typeid order by b.sort desc) order by a.sort desc
select * from question a
where a.id in (select top 5 id from question b where b.typeid=a.typeid)
select * from question a
where a.id in (select top 5 id from question b where question.typeid=question.typeid)
select * from test a
where a.id in (select top 5 id from test b where a.组号=b.组号)
--try,没测试数据,只能写个大概