title: Get latest entry from multiple entries for the same user from a table
body: <p>I have 2 tables. <strong>Table A and Table B</strong>. </p>
  
  <p>Table A contains the details of individual users. </p>
  
  <p>Table B contains 3 columns, namely <strong>"is_completed", "user_id" and "work_id"</strong>......</p>
  
  <p>Table B tracks the details of work done by users and whether the work is completed or not. If completed, then that user can be assigned another work. </p>
  
  <p><strong>Problem Statement :</strong> 
  I assigned a work to user 1 and his is_completed is 0 (work not finished)...now I assume that after some days, his work is finished, so I did is_completed as 1 but at the same time I assigned another work to the same user 1 and now is_completed is 0. So I have two rows of same user, one with is_completed as 1 and another is_completed as 0 in Table B. </p>
  
  <p><strong>How can I fetch the latest is_completed i.e. user 1 as working or say busy?</strong></p>