向各位请教一个问题 select * from 表 ta where 值 in (select top 3 值 from 表 where 组=ta.组 order by 日期desc) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 --假设你的字段如此,并且你的id是唯一的id type data dateselect * from tablename a where id in (select top 3 id from tablename where type =a.type ) --try:select * from Twhere 3>(select count(*) from T a where a.商品编码=T.商品编码 and a.id<T.id) UP UP UP UP UP 楼上select * from tablename a where id in (select top 3 id from tablename where type =a.type ) sql2000中如何一到时间就自动删除一个表中的纪录 sql server 中使用update openquery 语法的问题,请高手指点... (100分)求SQL或存储过程 有这样一个问题,请大家帮忙啊,谢谢! 请问,如果发现数据库有SQL语句错误,应该怎么排查? 关于sum和case组合使用的问题 一个很简单的问题 急救,关于数据库置疑后,紧急恢复的问题!!!急急急! 请问各位大哥,在SQL Server中如何存图片 菜鸟提问! sql问题 SQLSERVER2000大数据量更新问题,请高手指教,高效率的方法,谢谢!
id type data dateselect * from tablename a
where id in (select top 3 id from tablename where type =a.type )
where 3>(select count(*) from T a where a.商品编码=T.商品编码 and a.id<T.id)
select * from tablename a
where id in (select top 3 id from tablename where type =a.type )