课程: Hands-On SQL Challenges: Test Your Knowledge
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Check for books due back - SQL教程
课程: Hands-On SQL Challenges: Test Your Knowledge
Solution: Check for books due back
- [Instructor] This challenge asked us to prepare a report of books that are due to be returned or which are overdue on a specific day. In order to find which books are due back on a given day, we'll use a select statement and we'll need to use the due date field from the loans table. We'll also need the book title and some patron information. The first field I'm using is from the loans table, so I'll add from loans. You don't have to use the first table you reference as the from condition, but it helps keep things organized. And depending on how you prefer to write queries, you might use aliases to provide shorter names for each table here. In this query, I've left the table names alone, so we can see what we're doing more easily. We'll also need information from the books table, so I'll join that and set the book ID field in the loans table to match up with the book ID field in the books table. And then we'll need patron information as well. So I'll add join patrons and say that the…
内容
-
-
-
-
(已锁定)
Solution: Check book availability1 分钟 41 秒
-
(已锁定)
Solution: Add new books to the library1 分钟 39 秒
-
(已锁定)
Solution: Check out books2 分钟 11 秒
-
(已锁定)
Solution: Check for books due back1 分钟 42 秒
-
(已锁定)
Solution: Return books to the library2 分钟 10 秒
-
(已锁定)
Solution: Encourage patrons to check out books1 分钟 21 秒
-
(已锁定)
Solution: Find books to feature for an event1 分钟 29 秒
-
(已锁定)
Solution: Book statistics2 分钟 48 秒
-
(已锁定)
-