0
点赞
收藏
分享

微信扫一扫

查询重复数据,删除最早创建的

sunflower821 2023-10-10 阅读 13

select * from sku WHERE (company_code ,code,create_time) in (
select company_code,code,min(create_time)   from sku  
GROUP BY company_code ,code HAVING count(1) >1) order by code;

select code,ean from sku  where company_code='Dior' GROUP BY code having(count(1)) >1;

select code,ean from sku  where company_code='Dior' and code='S5106BNEM-M030-TU';

select code,ean from sku  where company_code='Dior' and code='28TC102B5176-C181-T48';

举报

相关推荐

0 条评论