java 发表于 2018-4-27 17:26:43

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]
查看完整版本: Mysql数据分组GROUP BY 和HAVING,与WHERE组合使用