From 3a32020d4e2eda2c53cae3c0a15cd306b061a8cd Mon Sep 17 00:00:00 2001 From: smallkun Date: Wed, 5 Mar 2025 08:49:26 +0800 Subject: [PATCH] Auto commit --- 2208/天天乐学考试答案/MySQL练习(一).md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/2208/天天乐学考试答案/MySQL练习(一).md b/2208/天天乐学考试答案/MySQL练习(一).md index 4960bcd..8643e56 100644 --- a/2208/天天乐学考试答案/MySQL练习(一).md +++ b/2208/天天乐学考试答案/MySQL练习(一).md @@ -345,8 +345,13 @@ WHERE st.stuid = sc.student_id AND sc.course_id = c.cid ORDER BY sc.score DESC; #8 +CREATE VIEW v_scores AS +SELECT c.cname, CEIL(AVG(sc.score)), MAX(sc.score), MIN(sc.score) +FROM tb_students st, tb_scores sc, tb_courses c +WHERE st.stuid = sc.student_id AND sc.course_id = c.cid +GROUP BY c.cid; - +#9 ```