欢迎来到PP题库网 PP题库官网
logo
全部科目 > 大学试题 > 计算机科学 > 计算机程序设计 > 结构化查询语言(SQL)

单项选择题

假设订单表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

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题