title: SQl Query : need to get the latest created data in the child records
body: <p>I have a requirment in which I need to get the latest created data in the child records.</p>
  
  <p>Suppose there are two tables A and B. A is parent and B is child. They have 1:M relation. Both has some columns and B table has one 'created date' column also which holds the created date of the record in table B. </p>
  
  <p>Now, I need to write a query which can fetch all records from A table and it's latest created child record from B table. suppose If two child records are created today in table B for a parent record then the latest one out of them should get fetch.</p>
  
  <p>One record of A table could have many childs, so how can we achive this.  </p>
  
  <p>Result should be - Columns of tbl A, Columns of tbl B(Latest created one)</p>