select * from staticcatalogue WHERE UPPER(Source) IN (SELECT UPPER(Source) FROM staticcatalogue GROUP BY UPPER(Source) having count(UPPER(Source))>1) ORDER BY upper(Source) DESC;
CREATE TABLE staticcatalogue_tmp SELECT UPPER(Source) AS Source FROM staticcatalogue GROUP BY UPPER(Source) having count(UPPER(Source))>1; ALTER TABLE staticcatalogue_tmp add INDEX TX_1 (Source); select s.* from staticcatalogue s WHERE UPPER(s.Source) IN (SELECT st.Source FROM staticcatalogue_tmp st) ORDER BY UPPER(s.Source) DESC ;