• 2022-06-08 问题

    有订单表orders, ,包含用户信息userid, 产品信息productid,以下能够返回至少被订购过两次的productid的SQL语句是() A: select productid from orderswhere count(productid)>1; B: select productid from orderswhere max(productid)>1; C: select productid from orderswhere having count(productid)>1group by productid; D: select productid from ordersgroup by productidhaving count(productid)>1;

    有订单表orders, ,包含用户信息userid, 产品信息productid,以下能够返回至少被订购过两次的productid的SQL语句是() A: select productid from orderswhere count(productid)>1; B: select productid from orderswhere max(productid)>1; C: select productid from orderswhere having count(productid)>1group by productid; D: select productid from ordersgroup by productidhaving count(productid)>1;

  • 2021-04-14 问题

    【单选题】假设订单表 orders 用于存储订单信息, cid 代表客户编号, money 代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,则下列() SQL 语句可以返回正确的结果。 A. select cid,count(distinct(cid)),sum(money) from ordersgroup by cid B. select cid , count(distinct(cid)) , sum(money) fromorders order by cid C. select cid , count(cid) , sum(money) from orders orderby cid D. select cid , count(cid) , sum(money) from orders groupby cid

    【单选题】假设订单表 orders 用于存储订单信息, cid 代表客户编号, money 代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,则下列() SQL 语句可以返回正确的结果。 A. select cid,count(distinct(cid)),sum(money) from ordersgroup by cid B. select cid , count(distinct(cid)) , sum(money) fromorders order by cid C. select cid , count(cid) , sum(money) from orders orderby cid D. select cid , count(cid) , sum(money) from orders groupby cid

  • 1