题目
题目
单项选择题

Question at position 57 We can calculate the cumulative sum for each date using the following SQL statement: SELECT t1.date, t1.precip AS 'daily precip', SUM(t2.precip) AS 'cum. precip' FROM rainfall AS t1 INNER JOIN rainfall AS t2 ON t2.date >= t1.date GROUP BY t1.date ORDER BY t1.date;TrueFalse

选项
A.True
B.False
查看解析

查看解析

标准答案
Please login to view
思路分析
The question presents a self-join SQL statement and asks whether it correctly computes a cumulative sum by date. Option 1 (True): This statement asserts that the given query can calculate the cumulative precipitation. However, the INNER JOIN condition uses t2.date >= t1.date. That comparison pairs each date t1.date with all dates t2.date that are on or after that date, so the SUM(t2.precip) aggregates precipitation from t......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!