title: get only one row from products table for each category row with category name included
body: <p>I have two tables products and category. 1 category has many products. On the index page I just want to show only one latest product belonging to each category. in other words one product for one category.</p>
  
  <p>Here is my table structure
  Category table</p>
  
  <p><img src="https://i.stack.imgur.com/iccgM.jpg" alt="Category table"></p>
  
  <p>product table
  <img src="https://i.stack.imgur.com/6rwYP.jpg" alt="Product table"></p>
  
  <p>I have tried many answer but was unable to understand their answered queries. so plz recommend me query and also elaborate it if possible.</p>