title: does anyone know how to list the empid and the name of all supervisors if supervisors are in employee table too?
body: <p>I have a table that contains <code>empid</code>, <code>name</code>, <code>salary</code>, <code>hiredate</code>, <code>position</code> and <code>supervisor</code> (which includes <code>empid</code>, not the name). How do I list the empid and name of all supervisors?</p>
  
  <p>The output has to have to columns <code>supervisor</code> (and a list of their empid) and their names. This is the <code>create</code> statement used to create the <code>Employee</code> table:</p>
  
  <pre><code>/* Create table Employee */
  IF OBJECT_ID('Employee', 'U') IS NOT NULL
    DROP TABLE Employee
  GO
  CREATE TABLE Employee (
  emp_id NCHAR(5), 
  name NVARCHAR(20), 
  position NVARCHAR(20),
  hire_date DATETIME,
  salary MONEY, 
  bcode NCHAR(3),
  supervisor NCHAR(5)
  )
  </code></pre>
  
  <p>I have tried a variety of statements using having statement and count but they don't seem to work.</p>
  
  <pre><code>select emp_id, name from employee where position='manager';
  </code></pre>
  
  <p>I tried this but it doesn't work. Anyone smart that knows how to do it? </p>