title: Inner Join Same table for values
body: <p>My Table has entries as below. Where object id would be same. I need to pick up the other value of object id which has "HR" / "Infra" for that particular object_id.</p>
  
  <pre><code>--------------------------------------------------
  |id     | field_id  | object_id     | value_text
  ----------------------------------------------------    
  |182    |   11      | 149           | HR
  |183    |   13      | 149           | Learning Management   
  |184    |   11      | 150           | HR 
  |185    |   13      | 150           | Compensation &amp; Benefits   
  |186    |   11      | 151           | HR 
  |187    |   13      | 151           | Leave Management  
  |188    |   11      | 152           | HR 
  |189    |   13      | 152           | Compensation &amp; Benefits   
  |190    |   11      | 153           | Infra 
  |191    |   13      | 153           | Hardisk   
  |192    |   11      | 154           | Infra 
  |193    |   13      | 154           | Software  
  |194    |   11      | 155           | Infra
  |195    |   13      | 155           | Network   
  |196    |   11      | 156           | HR 
  |197    |   13      | 156           | Position Management   
  |198    |   11      | 139           | HR 
  |199    |   13      | 139           | Compensation &amp; Benefits   
  |200    |   11      | 157           | Infra 
  |201    |   13      | 157           | Network       
  </code></pre>
  
  <p>Query:</p>
  
  <pre><code>SELECT d.value_text 
  FROM dynamic d 
  INNER JOIN dynamic dv ON d.object_id = d.object_id AND d.field_id = "13" 
                       AND dv.field_id = "11" AND dv.value_text = "HR"
  </code></pre>
  
  <p>output required:</p>
  
  <pre><code>--------------
  | value_text |
  --------------
  | Learning Management 
  | Compensation &amp; Benefits
  | Position Management
  </code></pre>
  
  <p>Second Query:</p>
  
  <pre><code>SELECT d.value_text 
  FROM dynamic d 
  INNER JOIN dynamic dv ON d.object_id = d.object_id AND d.field_id = "13" 
                       AND dv.field_id = "11" AND dv.value_text = "Infra"
  </code></pre>
  
  <p>output required:</p>
  
  <pre><code>--------------
  | value_text |
  --------------
  | Network 
  | Software
  | Hardisk
  </code></pre>
  
  <p>How to modify the query to get the details. .</p>