题目
ECON3310001.1251 Midterm Exam II
数值题
Expanding Route Data Join the routes, airlines, and airports tables to obtain: airline_id, airline_name, airline_country, source_city, source_country, target_city, target_country. Let "cells" be the product between the arity and the cardinality of a table. Question: What is the total number of cells in the result (rows × columns)?
查看解析
标准答案
Please login to view
思路分析
Start by identifying what the question is asking: compute the total number of cells (rows × columns) in the result of joining three tables (routes, airlines, airports) and selecting specific columns. The phrase "Let 'cells' be the product between the arity and the cardinality of a table" defines a cell as a single value in one column of one row, so to get the total number of cells in the final result you need two things: (1) how many columns are in the final projection, and (2) how many rows result from the join.
First, determine the output schema (the number of columns) after projection. The question lists seven columns to select: airline_id, airline_name, airline_country, source_city......Login to view full explanation登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
Two tables may be joined:
Question at position 51 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
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
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
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!