How to change query to nested select?
<p>I have a project where I have to use nested select and operators like EXISTS, IN, ALL, ANY, to find the name of the owners who own more apartments.</p>

<p>I have the 2 tables owners and apartments</p>

<pre><code>Owner
"ID" NUMBER(5,0), 
"NAME" VARCHAR2(20), 
"PHONE" NUMBER(10,0),
CONSTRAINT "PROPR" PRIMARY KEY ("ID")
USING INDEX  ENABLE; 

Apartment
"ID_AP" NUMBER(5,0), 
"ADDRESS" VARCHAR2(35), 
"SURFACE" NUMBER(10,0),
"ID" NUMBER(5,0),
CONSTRAINT "APART" PRIMARY KEY ("ID_AP")
USING INDEX  ENABLE;
</code></pre>

<p>In order to find the owners who have more than one apartment, I wrote this</p>

<pre><code>SELECT name, id, count(id)
from apartment join owner
using (id)
group by id, name
having count(id)&gt;1
</code></pre>

<p>But how do I use nested Selects and one of the operators EXISTS, IN, ALL, ANY?</p>