A、SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表; HAVING COUNT(*)>=2
B、SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表; GROUP BY 仓库号 HAVING COUNT(*)>=2
C、SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表; GROUP BY 仓库号 SET COUNT(*)>=2
D、SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表; GROUP BY 仓库号 WHERE COUNT(*)>=2
查看答案
正确答案
试题解析
解析:本题利用SQL分组查询的功能,计算至少有两个职工的每个仓库的平均工资,利用HAVING子句可以对分组条件做进一步限定。