MySQL MySQL: Fetching distinct records from table HAVING COUNT greater than 3 March 19, 2013JamesLeave a comment [code language=”sql”] SELECT city, COUNT(id) AS id FROM YourTable GROUP BY city HAVING COUNT(id) > 3 [/code]