Algorithm


Code Examples

#1 Code Example with MySQL

Code - MySQL


SELECT pro.id, pro.name,pro.sku, sum(tsl.quantity) as totalSoldQty, LEFT(tsl.created_at, 10) as date
FROM products as pro   
LEFT JOIN transaction_sell_lines tsl on tsl.product_id=pro.id  
where sku=26017 and tsl.created_at between '2019-07-01' and '2019-08-30'
and pro.business_id=7
GROUP BY LEFT(tsl.created_at, 10) 
Copy The Code & Try With Live Editor
Advertisements

Demonstration


Date wise Product Sell Quantity in MySQL