MrTV
asked on
mysql sww the duplicate on colum1 colum2 colum3
How can I cout the duplicate on colum1 and colum2 and colum3
I want the same address that duplicate
Hno road destrict if 3 colums is the same it mean it the same place
I want the same address that duplicate
Hno road destrict if 3 colums is the same it mean it the same place
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select t.*, x.cnt
from tbl t inner join (
select hno, road, district
from tbl
group by hno, road, district
having count(*) > 1
) AS x on x.hno=t.hno and x.road=t.road and x.district=t.district
order by t.hno, t.road, t.district