Bestsellers Products

Magento

 

Magento is an open-source e-commerce platform by EBay inc.

Bestsellers Products (filtered data by year)

Query Text

SELECT 
    p."name", SUM(s."qty_ordered") AS "Quantity Ordered"
FROM 
    "SalesOrderItems" s
LEFT OUTER JOIN "Products" AS p ON p."product_id" = s."product_id"
WHERE
    strftime('%Y', s."created_at") = '2015'
GROUP BY 
    p."product_id"
ORDER BY 2 DESC
  

Open Query