047 第141题 请教
时间:2011-10-03
来源:互联网
141. View the Exhibit and examine the descriptions for ORDERS and ORDER_ITEMS tables.
Evaluate the following SQL statement:
SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Order Amount"
FROM order_items oi JOIN orders o
ON oi.order_id = o.order_id
GROUP BY CUBE (o.customer_id, oi.product_id);
Which three statements are true regarding the output of this SQL statement? (Choose three.)
A. It would return the subtotals for the Order Amount of every CUSTOMER_ID.
B. It would return the subtotals for the Order Amount for every PRODUCT_ID.
C. It would return the subtotals for the Order Amount of every PRODUCT_ID and CUSTOMER_ID as one
group.
D. It would return the subtotals for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as one
group.
E. It would return only the grand total for the Order Amount of every CUSTOMER_ID and PRODUCT_ID
as one group.
Answer: ABD
c和d感觉是一样的啊,还是我理解有误。。。
Evaluate the following SQL statement:
SELECT o.customer_id, oi.product_id, SUM(oi.unit_price*oi.quantity) "Order Amount"
FROM order_items oi JOIN orders o
ON oi.order_id = o.order_id
GROUP BY CUBE (o.customer_id, oi.product_id);
Which three statements are true regarding the output of this SQL statement? (Choose three.)
A. It would return the subtotals for the Order Amount of every CUSTOMER_ID.
B. It would return the subtotals for the Order Amount for every PRODUCT_ID.
C. It would return the subtotals for the Order Amount of every PRODUCT_ID and CUSTOMER_ID as one
group.
D. It would return the subtotals for the Order Amount of every CUSTOMER_ID and PRODUCT_ID as one
group.
E. It would return only the grand total for the Order Amount of every CUSTOMER_ID and PRODUCT_ID
as one group.
Answer: ABD
c和d感觉是一样的啊,还是我理解有误。。。
作者: xianyi_ 发布时间: 2011-10-03
排序後結果集是一樣的,但D的順序與cube中一致。期待專家解釋。
作者: nGX20080110 发布时间: 2011-10-04
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28