Created
November 11, 2019 09:56
-
-
Save ManiruzzamanAkash/6a007bc1fb0c577a741ecab206d90fb4 to your computer and use it in GitHub Desktop.
Get Date wise product sale quantity summation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment