title: Querying the same table twice to get 2 records..in one query
body: <p>I'm using SQL Server 2016, but this is not a 2016 question. Here's what I would like to do. I will have the user's email address and will need to get data for that user. So this is simple:</p>
  
  <pre><code>select [firstname],[lastname],[managerid] from employees where workemail='emp@company.com'
  </code></pre>
  
  <p>Very straight forward, but notice i'm pulling the manager's id. And i now need the exact same data for the manager, sans the manager's id:</p>
  
  <pre><code>select [firstname],[lastname] from employees where mamangerid=manager_id_from_employee_query
  </code></pre>
  
  <p>You can see all data is in the same table. I could stop here because I have my data, but I love to learn and look for better solutions. How can i achieve what I'm trying to do without having to write 2 separate SQL statements or what would be the better solution?</p>