I need to select the five latest products of each brand category, then display those results grouped by the category.
MySQL database looks like;
Table product
:
product_id (pk)
product_name
product_etc
product_publish_date
brand_id (fk)
Table brand
brand_id (pk)
brand_name
Results should come out like the following...
brand_a product k
brand_a product a
brand_a product h
brand_a product l
brand_a product 33
brand_b product h
brand_b product z
brand_b product 9
brand_b product ddd
brand_b product a
Tried with