sql--分组后每组数据按时间删除超过48次抓取的数据

 

 

delete  from weibohour where id not in
(
select  top 100 percent id  from weibohour   as a
where (select count(1)  from weibohour   b where a.url=b.url   and b.id<a.id)<48   order by adddate asc
)

 

posted on 2018-01-03 11:36  奔游浪子  阅读(162)  评论(0)    收藏  举报

导航