Possible Duplicate:
Writing an SQL query to SELECT item from the following table
I am having trouble figuring out how to write a SELECT query that selects every cell from the table that has more than one of the same cell value in the column. For example if column name is "Cars" then select "Ford" only if "Ford" takes up more than one cell in the column.
Here's a version w/o the extra column:
Select cars from (select cars, count(*) as nbr from theTable group by cars)
where nbr > 1;
You may need to use the Having clause.
SELECT count(*), cars
FROM table
GROUP BY cars
HAVING count(*) > 1