3.2. National Computer Level 3 Database Examination—Backend Programming Technology

Test question one:

Insert image description here
Insert image description here

Question 2:

Insert image description here
Insert image description here

Question 3

Insert image description hereInsert image description here

Question 4

Insert image description here
Insert image description here

Question 5

Insert image description here
Insert image description here

Question 6

Insert image description here
Insert image description here

Question 7

Insert image description here
Insert image description here

Question 8

Insert image description here
Insert image description here

Question 9

Insert image description here
Insert image description here

Question 10

Insert image description here
Answer: [Reference answer]
(1) SELECT LOANS. Library card number, name, department name, COUNT( ) AS Number of borrowed books
FROM BORROWER, LOANS
WHERE BORROWER. Library card number = LOANS. Library card number
GROUP BY LOANS .Library card number
HAVING COUNT(
)>=5;
(2) SELECT name, department name, book title, borrowing date
FROM BORROWER, LOANS, BOOKS
WHERE
BORROWER. Library card number = LOANS. Library card number AND LOANS .Library Registration Number=BOOKS.Book Registration Number
AND Call Number IN
(
SELECT Call Number FROM BORROWER,LOANS,BOOKS
WHERE BORROW.Library Card Number=LOANS.Library Card Number
AND LOANS.Library Registration Number=BOOKS.Books Registration number
AND name = "Wang Li"
)

Guess you like

Origin blog.csdn.net/weixin_44391817/article/details/132509035