考试报名
考试报名
考试内容
考试大纲
在线客服
返回顶部

备考刷题,请到

CDA认证小程序

The following is an E-R diagram of transaction related tables for a company. Please answer the questions by observing the diagram: 产品表:products table 区域表:regions table 订单表:orders table 订单提成表:commissions table 赵大:Zhao Da 王二:Wang Er 孙三:Sun san Using the salesperson field in the commissions table to filter the order_amount field in the orders table, and aggregating using a SUM, if the desired result for Zhao Da's total order amount is 7000, the correct description of the valid connection path is:
A. The connection between commissions and orders tables becomes valid
B. The connection between commissions and regions tables becomes valid
C. The connection between products and commissions tables becomes valid
D. No matter the valid connection, the result of 7000 for Zhao Da's total order amount cannot be obtained
上一题
下一题
收藏
点赞
评论
题目解析
题目评论(0)

The orders and commissions tables can be directly connected via the order_id, and filtering using a type 1 calculation gives Zhao Da's amount as 7000. Therefore A is correct.

正确答案是:A: The connection between commissions and orders tables becomes valid

专业分析:

在题目中,我们需要通过commissions表中的salesperson字段来过滤orders表中的order_amount字段,并使用SUM进行聚合,以获得赵大的总订单金额为7000。

具体分析步骤如下:

1. **识别相关表和字段**:
- commissions表中有salesperson字段,可以用来过滤特定销售人员的记录。
- orders表中有order_amount字段,可以用来计算订单金额的总和。

2. **表之间的连接关系**:
- commissions表和orders表之间通过order_id字段进行连接。
- 通过这个连接,我们可以从commissions表中过滤出赵大的订单记录,然后在orders表中找到对应的order_amount字段。

3. **数据过滤和聚合**:
- 首先,在commissions表中找到salesperson为赵大的所有记录。
- 然后,通过这些记录中的order_id字段,连接到orders表,获取对应的order_amount字段。
- 最后,对这些order_amount字段进行SUM聚合,以计算赵大的总订单金额。

通过上述分析,只有选项A(The connection between commissions and orders tables becomes valid)是正确的,因为它描述了我们通过commissions表和orders表之间的连接来过滤和计算赵大的总订单金额的过程。

选项B和C涉及的表(regions和products)与计算订单金额无关,因此不正确。选项D则直接否定了可能性,但根据正确的连接路径,我们可以得到赵大的总订单金额为7000,因此D也不正确。