From 9219d6cc3cf891e1ce3d909b5b731a3f9ab5bce0 Mon Sep 17 00:00:00 2001 From: smallkun Date: Thu, 27 Feb 2025 17:25:03 +0800 Subject: [PATCH] Auto commit --- 2208/天天乐学考试答案/MySQL练习(一).md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/2208/天天乐学考试答案/MySQL练习(一).md b/2208/天天乐学考试答案/MySQL练习(一).md index e827cbf..44839cb 100644 --- a/2208/天天乐学考试答案/MySQL练习(一).md +++ b/2208/天天乐学考试答案/MySQL练习(一).md @@ -230,11 +230,11 @@ FROM tb_books b; UPDATE tb_books b SET b.note = SUBSTR(b.note,INSTR(b.note,'-')+2); -#7 -SELECT b.book_id, b.title, -FROM tb_books b -WHERE YEAR(b.publication_date) BETWEEN 1980 AND 2010 -ORDER BY +#7 tj11 +SELECT b.book_id, b.title, a.author_id, a.author_name, b.publication_date +FROM tb_books b, tb_authors a +WHERE b.note = a.author_name AND YEAR(b.publication_date) BETWEEN 1980 AND 2010 +ORDER BY b.publication_date DESC; #8