title: How i can apply sub query in join
body: <p>Here is my tables given below:</p>
  
  <p><strong>userDetails table :</strong></p>
  
  <pre><code>userid      name
   1          A   
   2          B
  </code></pre>
  
  <p><strong>Logs table :</strong></p>
  
  <pre><code>Id          requesterId         ApproveId
  1               1                   2  
  </code></pre>
  
  <p>I am trying this the following query :</p>
  
  <pre><code>select * from userDetils.name as Requester,**(What i can do here to get approver name)**
  from Logs
  join userDetail on Logs.requesterId = userDetails.userid
  </code></pre>
  
  <p><strong>Problem :</strong></p>
  
  <p>How i can get requester and approver name</p>
  
  <p>as </p>
  
  <pre><code>Requester   Approver
    A           B
  </code></pre>