Hi!
How does one check for duplicates of anything?
For example, in the customers table, I want to check for duplicate zip codes, and display them.
So, if there are 40 records of zipcode '84065', and 35 records of '84123'.
By the way, I don't know what zip codes are out there, I just used those as examples. So, I don't have an particular zip code I'd like to view. I'm just curious to see how many of any duplicate zip codes are in the table.
This query does the exact opposite of what I want to do:
SELECT DISTINCT zipcode FROM customers
And I tried this query,but it only seemed to cause my PhpMyAdmin to bog down:
SELECT zipcode FROM customers
WHERE zipcode IN
( SELECT zipcode FROM customers GROUP BY zipcode HAVING COUNT(*) > 1 )
How would I pull out only zip codes, if, there are more than 1?
thanks!!