MySQL的数据汇聚AVG,COUNT,MAX,MIN,SUM
没啥好看的,简单的很
1 AVG平均
select avg(prod_price) from products
where vend_id = 1003 ;
2 count计数
select count(*) as num_count from products ;
3 Max/Min 最大值/最小值
select max(prod_price) from products ;
select min(prod_price) from products ;
5 Sum求和
select sum(quantity) from orderitems where order_num = 20005 ;