支付日期 date ,
城市 varchar(10),
用户ID char(5),
订单ID char(5),
支付金额 int(8),
其中,一个用户可以下多笔订单,订单ID为标识码。
计算2020年6月每个城市的订单数()
A.
select 城市,count(订单ID) as 订单数 from pay_fact where year(订单日期)=2020 or month(订单日期)=6 group by 城市;
B.
select 城市,count(订单ID) as 订单数 from pay_fact group by 城市 where year(订单日期)=2020 and month(订单日期)=6;
C.
select 城市,count(订单ID) as 订单数 from pay_fact where year(订单日期)=2020 and month(订单日期)=6 group by 城市;
D.
select 城市,count(订单ID) as 订单数 from pay_fact group by 城市 having year(订单日期)=2020 and month(订单日期)=6;

扫码回复“10306274”查看答案
题库


雷达卡





京公网安备 11010802022788号







