试题详情
单项选择题假设订单表orders用来存储订单信息,cid代表客户编号,money代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,下面()sql语句可以返回正确结果。

A、select cid,count(distinct(cid)),sum(money) from orders group by cid

B、select cid,count(distinct(cid)),sum(money) from orders order by cid

C、select cid,count(cid),sum(money) from orders order by cid

D、select cid,count(cid),sum(money) from orders group by cid

  • D
  • 关注下方微信公众号,在线模考后查看

热门试题