《SQL 进阶教程》 查找局部不一致的数据

-- 从下面这张商品表里找出价格相等的商品的组合

select * from products p1
LEFT JOIN products p2
on p1.price = p2.price and p1.name > p2.name
where p2.name is not null

原文地址:https://www.cnblogs.com/newlangwen/p/11425909.html