SELECT name from SUPPLIER
WHERE code =
(SELECT code FROM STOCK GROUP BY code HAVING COUNT(DISTINCT code)>=3);
I am using SQLPLUS. When the query returns a single result I get the answer I am looking for. However, when it returns more than one row I get this error message:
ORA-01427: single-row subquery returns more than one row