title: how to pull unique results
body: <p>im looking for query to load and group the data </p>
  
  <p>i do have 1:n relationship of Parent:Child</p>
  
  <p>and i want to  pull latest child,instead of children, of a parent</p>
  
  <p>that means each entry should have unique parent with latest child. </p>
  
  <p><strong>Child Table</strong> 
  <img src="https://i.stack.imgur.com/EArTN.jpg" alt="alt text"></p>
  
  <p><strong>Desired Results</strong>
  <img src="https://i.stack.imgur.com/yaw7p.jpg" alt="alt text"></p>
  
  <p>Tried:</p>
  
  <p>i have tried following query but it get me oldest results</p>
  
  <pre><code>SELECT c.* FROM child  AS c GROUP BY c.parent_id HAVING(MAX(c.order))
  </code></pre>
  
  <p>Thanks in advance</p>