mysql - Finding and displaying duplicate values using WHERE IN to compare two values -
i have mysql database compare duplicated values based on 2 values in column. example database field_one | field_two | field_three ------------------------------------ aaa | 123 | no1 bbb | 456 | no1 aaa | 123 | no2 ccc | 456 | no3 aaa | 123 | no3 i return these results field_one | field_two | field_three ------------------------------------ aaa | 123 | no1 aaa | 123 | no2 here query i've been using i'm not sure how desired result. when run query in phpmyadmin browser gets stuck. database large too. select * table_name field_three in (select field_one , field_two table_name field_three in ('no1', 'no2') having count(*) > 1) thanks solved i changed where @gordon linoff 's query . select t.* table_name t join (select field_one, field_two table_name t group field_one, field_two having count(*) = 2 -- or mean ...