CREATE TABLE doctor( patient CHAR(13), docname CHAR(30) );
Say I had a table like this, then how would I display the names of the doctors that have
This should do it for you:
SELECT docname FROM doctor GROUP BY docname HAVING COUNT(patient)= (SELECT MAX(patientcount) FROM (SELECT docname,COUNT(patient) AS patientcount FROM doctor GROUP BY docname) t1)