日期範圍內商品銷售額排行榜的SQL語句編寫

一:涉及訂單表,訂單詳細表 SQL: SELECT productName '商品名稱',SUM(price*number) '銷售總額' FROM t_orderdetail WHERE orderID IN (SELECT id FROM t_order WHERE DATE(createdate) BETWEEN '2014-01-01' AND '2014-01-31') GROUP BY
相關文章
相關標籤/搜索