I have a table_1
ID Seller buyer cost
100 abc xyz 10.00
200 abc xyz 10.00
300 abc xyz 30.00
My goal to get select duplicate records and expect result
ID Seller buyer cost
100 abc xyz 10.00
200 abc xyz 10.00
Query
select *
from Table_1
where cost in (
select cost
from Table_1
where seller = buyer
group by cost
having count(*) >= 2
)
This does not return any results.
2条答案
按热度按时间of1yzvn41#
You can use
EXISTS
for thisz4iuyo4d2#