sql 分组求和 、分组求平均

SELECT device_type_name, AVG(rate)FROM tb_device_rate GROUP BY device_type_nameSELECT device_type_name, SUM(rate)FROM tb_device_rate GROUP BY device_type_nameSELECT device_type_name, AVG(rate) AS rateFROM tb_device_rate GROUP BY device_type_name

    推荐阅读