课程: SQL Practice: Basic Queries
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Retrieve aggregated data
- [Instructor] In this code challenge, you're asked to find the three customers that have the most orders historically over time. You'll work with two tables in this database, the customers table and the orders table. These two tables are linked together by the CustomerID columns. That's the primary key in the customers table and the second column in the orders table. The initial SQL statement just selects data from the customers table. I'll test the code and see, incorrect output, which is expected but see that the customer table has those three columns. CUSTOMERID, FIRSTNAME, and LASTNAME. Now I'm going to select everything from the orders table. The orders table has 1,000 rows and only some of them are displayed here. But you'll see that there's an ORDERID, a CUSTOMERID and an ORDERDATE. Now I'll show you my solution to this challenge. The challenge asked me to return the three customers who have made the most…
内容
-
-
-
Solution: Get sorted data from a table1 分钟 35 秒
-
(已锁定)
Solution: Retrieve data from multiple tables1 分钟 29 秒
-
(已锁定)
Solution: Retrieve data filtered on a range1 分钟 41 秒
-
(已锁定)
Solution: Retrieve aggregated data2 分钟 12 秒
-
(已锁定)
Solution: Get data filtered with a string pattern1 分钟 31 秒
-
(已锁定)
Solution: Find the most expensive order1 分钟 55 秒
-
(已锁定)
Solution: Find the average of orders2 分钟 5 秒
-
-