假设进货表如下表所示,要统计各类产品的货物种数、平均单价、货物总量,下列SQL语句正确的是
A.
SELECT 产品类型,SUM(货物名称) AS 货物种数,AVG(单价) AS 平均单价,SUM(数量) AS 货物总量 FROM 进货表 GROUP BY 产品类型
B.
SELECT 产品类型,COUNT(*) AS 货物种数,AVG(单价) AS 平均单价,SUM(数量) AS 货物总量 FROM 进货表 GROUP BY 产品类型
C.
SELECT 产品类型,COUNT(*) AS 货物种数,AVG(单价) AS 平均单价,COUNT(数量) AS 货物总量 FROM 进货表 GROUP BY 产品类型
D.
SELECT 货物名称,COUNT(*) AS 货物种数,AVG(单价) AS 平均单价,SUM(数量) AS 货物总量 FROM 进货表 GROUP BY 货物名称