Please can any one suggest on my query below. I need only records having more than 1 same customerid.
Select b.customerid, b.accountno
from customer a, account b, address c
group by b.customerid, b,accountno
having count(customerid) > 1;
For some reasons, I am getting single records along with duplicate records. I am only looking for duplicate records.
Eg; When I execute my query, I am geting the below records.
But I am looking for only the below records: