课堂小测验2:SQL (2026)
关于
2周前
更新
0
频次
11
题目数
分享
有问题?问问AI帮你修改 改主题:如咖啡问卷改为奶茶问卷
本测验总分18分,每题2分。请准确填写个人信息后完成作答,祝您答题顺利!
Q1:姓名
Q2:学号
Q3:A self-join resolves recursive relationships 自连接用于解决递归关系
Q4:An SQL statement containing an aggregate function must contain a GROUP BY clause. 包含聚合函数的 SQL 语句必须包含 GROUP BY 子句
Q5:A SELECT without a WHERE clause: 一个没有WHERE子句的SELECT:
Q6:The relation is: Book(ISBN: string, Title: string, PublisherID: integer, Price: decimal) 关系是:Book(ISBN: 字符串, Title: 字符串, PublisherID: 整数, Price: 小数)Which of the following queries returns the publisher ID of the book whose ISBN is 97836? 以下哪个查询返回 ISBN 为 “97836” 的书的出版商 ID?
Q7:Given the relation: Student(StudentID: integer, Name: string, Cohort: string, Gender: string). 关系是:Student(StudentID: 整数, Name: 字符串, Cohort: 字符串, Gender: 字符串)。Which of the following queries returns the list of cohorts (each cohort should list only once)? 以下哪个查询返回班级(cohorts)列表(每个班级只列出一次)?
Q8:Given the relation: Student(StudentID: integer, Name: string, Cohort: string, Gender: string). 关系是:Student(StudentID: 整数, Name: 字符串, Cohort: 字符串, Gender: 字符串)。How many rows will the following query return? 以下查询将返回多少行?select Cohort, count(StudentID) from Student group by Cohort;
Q9:The relation is: Student(StudentID: integer, Name: string, Cohort: string, Gender: string). 关系是:Student(StudentID: 整数, Name: 字符串, Cohort: 字符串, Gender: 字符串)。Which of the following queries returns the student ID for all students whose name begins with Sam? 以下哪个查询返回所有名字以 “Sam” 开头的学生的学生 ID?
Q10:Given the relation: Student(StudentID: integer, Name: string, Cohort: string, Gender: string). Assume the Gender column takes either F (female) or M (male). 关系是:Student(StudentID: 整数, Name: 字符串, Cohort: 字符串, Gender: 字符串)。假设 Gender 列只有 ‘F’(女性)或 ‘M’(男性)。Which of the following queries returns the number of female students for each cohort? 以下哪个查询返回每个班级(cohort)的女学生人数?
Q11:Consider the following three relations. They are about the relationship students taking courses. 考虑以下三个关系。它们是关于学生选课的关系。 [图片]Which of the following queries retrieves the names of students who take the course (ID) ‘CIS505’? 以下哪个查询检索选修课程(ID)为“CIS505”的学生的姓名?
联系我们
问卷网公众号