I am trying to SQL query (not Magento collection) to get at most 5 products day-wise which lie under my SQL date comparison check .
$sql = "SELECT `*` FROM `sales_bestsellers_aggregated_daily` AS `s` INNER JOIN `catalog_product_entity` AS `c` WHERE `s`.`product_id` = `c`.`entity_id` AND (`s`.`period` >= '19-10-27' AND `s`.`period` <= '19-11-06' ) AND `s`.`store_id`=1";
This gives me all the products that lie between
19-11-06. but I want to use a
limit of 5 for each date.
19-10-27 number of products, should be 1 to 5 (not all)