title: How to query on same table to fetch the data based on status
body: <p>In our application there is a report which shows how may points he/she transferred to other persons, as of now we are fetching with status "Transferred" but sometimes these points can be rejected by other person or sender.</p>
  
  <p>When transfer happens a row will be inserted in DB with status called "Transferred" and if the other persons receive or reject either case another row will be inserted status will update accordingly.</p>
  
  <p>Now I want to fetch in my reports only transactions that have successfully transferred and received, it should not fetch the transactions which transferred but rejected
  Transaction id will be same for Transfer, receive and rejected, to identify what action performed on transfer</p>
  
  <pre><code> id  trans_id Amount  from  to  createdOn                 status
  1234    1234  1000     abc  xys 2017-07-10 15:00:00       Transfer
  1235    1234  1000     abc  xys 2017-07-10 15:10:00       Rejected
  1236    1246  100      xyz  abc 2017-07-11 01:00:00       Transfer
  1235    1236  100      xyz  abc 2017-07-11 01:10:00       Received
  </code></pre>
  
  <p>I want to query to fetch as requested</p>