课程: Hands-On SQL Challenges: Test Your Knowledge
Solution: Create invitations for a party - SQL教程
课程: Hands-On SQL Challenges: Test Your Knowledge
Solution: Create invitations for a party
- [Instructor] To solve this challenge, here's what I did. I know I need to get information from the database, and to do that, I'll use the SELECT keyword. Then I need to specify the fields that I want information from, and in this case I'll use FirstName, LastName, and Email. I need to tell the database which table to read information from, so I'll use the FROM keyword and provide the Customers table. Finally, I need to tell the database how to sort the results that we get back. Customers weren't entered into this table in alphabetical order, and the order that records are stored in a database doesn't guarantee that we'll get them back in any particular order anyway, so I'll need to use the ORDER BY keyword and provide a field to use to sort the results. That'll be the LastName field. I'll run this. And there we go. We have a list of customers' names and emails, sorted by the customer's last name.
内容
-
-
-
Solution: Create invitations for a party49 秒
-
(已锁定)
Solution: Create a table to store information1 分钟 31 秒
-
(已锁定)
Solution: Print a menu59 秒
-
(已锁定)
Solution: Sign a customer up for your loyalty program1 分钟 51 秒
-
(已锁定)
Solution: Update a customer's personal information1 分钟 56 秒
-
(已锁定)
Solution: Remove information from the database3 分钟 9 秒
-
(已锁定)
Solution: Log customer responses to an invitation1 分钟 31 秒
-
(已锁定)
Solution: Look up reservations1 分钟 10 秒
-
(已锁定)
Solution: Take a reservation1 分钟 15 秒
-
(已锁定)
Solution: Take a delivery order2 分钟 35 秒
-
(已锁定)
Solution: Track your customer's favorite dishes1 分钟 14 秒
-
(已锁定)
Solution: Prepare a report of your top customers1 分钟 9 秒
-
-
-