title: will this sql work
body: <p>Write ONE SQL statement that prints the name of all employees and their department numbers for all salaried employees who satisfy all of the following conditions:</p>
  
  <ol>
  <li>Work on 2 projects,</li>
  <li>Do not make $30000,</li>
  <li>Their department manager and supervisor have the same name (Note: since name is not the pkey of employee tables, this requirement does not mean these two individuals are the same person).</li>
  </ol>
  
  <p>Note that supervisor is not the manager of the department</p>
  
  <p>SQL code:</p>
  
  <pre><code>select 
      ename, d#
  from 
      employee, department
  where 
      count(p#) = 2
      and salary &lt; 30000
      and cname, d# in (select ename, d#
                        from employee, department
                        where employee.cname = depatment.cname);
  </code></pre>