Monthly Sales by SKUheadingselect from_unixtime(A.date_orig,'%Y%m') as yearmonth, from_unixtime(A.date_orig,'%M, %Y') as dates, A.sku, B.account_id from %%AGILE_DB_PREFIX%%invoice_item A inner JOIN %%AGILE_DB_PREFIX%%invoice B ON (A.invoice_id=B.id and billing_status=1 and (refund_status=0 or refund_status is null) and B.site_id=%%DEFAULT_SITE%%)A.site_id = %%DEFAULT_SITE%%GROUP BY yearmonth ORDER BY yearmonth DESC0yearmonthtruetruefalsefalsefalseBreakdown for Month: datestrueAccountB.account_idfalseSKUskufalseselect A.sku, sum(A.quantity) as quan, sum(A.total_amt) as amt, from_unixtime(A.date_orig,'%Y%m') as yearmonth, B.account_id from %%AGILE_DB_PREFIX%%invoice_item A inner JOIN %%AGILE_DB_PREFIX%%invoice B ON (A.invoice_id=B.id and billing_status=1 and (refund_status=0 or refund_status is null) and B.site_id=%%DEFAULT_SITE%%)A.site_id = %%DEFAULT_SITE%%GROUP BY yearmonth, sku ORDER BY amt DESC30yearmonthfalsefalseSKUskuQuantityquantruenum,0num,0Amountamtdol,2truedol,2AccountB.account_idfalseselect A.sku, sum(A.total_amt) as amt, from_unixtime(A.date_orig,'%Y%m') as yearmonth, B.account_id from %%AGILE_DB_PREFIX%%invoice_item A inner JOIN %%AGILE_DB_PREFIX%%invoice B ON (A.invoice_id=B.id and billing_status=1 and (refund_status=0 or refund_status is null) and B.site_id=%%DEFAULT_SITE%%)A.site_id = %%DEFAULT_SITE%%GROUP BY yearmonth, sku ORDER BY amt DESC