title: Employees and managers in the same Project? SQL
body: <p>I did some digging and couldn't arrange it in my mind... My problem is finding employees and managers which are in the same project? I have 2 tables that they are Employee and Project. And they like;</p>
  
  <pre><code>   *Employee*               
     ----------               
     employee_id (PK)          
     name
     manager_id (FK)   ref employee_id in same table which is employee_id.
     usertype    
  
     *Project*
     ----------
     project_id(PK)
     project_name
     employee_id(FK)   ref employee_id in emplyee table
     manager_id(FK)    ref employee_id in emplyee table
  </code></pre>
  
  <p>Let me more specific. Project must have 1 manager and several employees. How can I write in query? usertype column specifies this employee MANAGER OR USER(normal employee).</p>
  
  <p>Query run example:</p>
  
  <pre><code>       ______    ______________    ____________
         |name|    |manager_name|   |project_name|  
          John         Susan       CalendarIphone
          Mike         Susan       CalendarIphone
          Joe         Patrick        AndoridApp
          Megan        Susan        CalendarIphone
          Melek       Patrick        AndoridApp
  </code></pre>
  
  <p>AS you can see Mike can work in more than one project and can have more than one manager. But managers must own only 1 project. So how should I do that for getting this? Thank in advance.</p>
  
  <p>EDIT-------------------------------------------------------------------------------</p>
  
  <p>I have an project which has dropdown list. I picked a Project here and it shows me a table according to this project and list me Manager of that Project, Employees in that project. I asked project name for just create one more column you can ignore it. I just want to see Manager of it and employees in it.</p>
  
  <p>EDIT 2-----------------------------------------------------------</p>
  
  <p>Project ID = 2 for example and in this project we have 1 manager and employees.</p>
  
  <pre><code>   |name|    |manager_name|    
      John         Susan      
      Mike         Susan       
      Joe          Susan       
      Megan        Susan       
      Melek        Susan
  </code></pre>