title: Sids of supplier who supply some particular part using Nested Queries
body: <p>Schema: </p>
  
  <blockquote>
    <p>Suppliers(sid: integer, sname: string, address: string)</p>
    
    <p>Parts(pid: integer, pname: string, color: string)</p>
    
    <p>_Catalog(sid: integer, pid: integer, cost: real)</p>
  </blockquote>
  
  <p>And the question is:</p>
  
  <blockquote>
    <p>Find the sids of suppliers who supply some red part or are at 221
    Packer Ave.</p>
  </blockquote>
  
  <p>I've tried different methods like: </p>
  
  <blockquote>
    <p>Method 1:</p>
  </blockquote>
  
  <pre><code>select sid 
  from   Suppliers 
  where  sid = (select pid 
                from parts 
                where color= 'Red') 
  or     address='221 Packer Ave';
  </code></pre>
  
  <blockquote>
    <p>Method 2:</p>
  </blockquote>
  
  <pre><code>select sid 
  from   _Catalog 
  where  (pid IN(select pid from Parts where color='Red') 
          OR 
          sid IN(select sid from Suppliers where address='221 Packer Ave'));
  </code></pre>
  
  <p>It shows no output in the 2nd method and returns an error in the 1st method <code>Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, &lt;, &lt;= , &gt;, &gt;= or when the subquery is used as an expression.</code>
  What am i doing wrong? and Is there any other, solution to this?</p>
  
  <p><strong>NOTE: I need a nested query to solve this problem, because I've not studied joins and advance stuff yet.</strong></p>