Mysql数据分组GROUP BY 和HAVING,与WHERE组合使用
SELECT order_num,SUM(quantity*item_price) AS ordertotal FROM orderitems GROUP BY order_num HAVING SUM(quantity*item_price)>=50 ORDER BY ordertotal;https://blog.csdn.net/liuchunming033/article/details/47279003
页:
[1]