课程: SQL Hands-On Practice: Solve Business Problems

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Combining aggregate functions with CTEs

Combining aggregate functions with CTEs

- [Instructor] Now that you've collaborated with the leadership team to understand the goal and define the project scope, you're ready to get your hands dirty in the data. I'm using DB browser for SQL Lite here, but you can use any IDE that supports SQL. Let's first check out one of the most used tables at the company, the subscriptions table. We're going to write SELECT * FROM SUBSCRIPTIONS, and now we're going to run this. Keep in mind that when you're writing queries in the real world, you may want to add a limit to the end of your query to limit the amount of rows returned. But this is a small sample dataset. So you can see here it's only 28 rows. So we're going to run this as is. This step is really important because it allows us to see our data in a way that lets us begin to understand the relationships between the variables, so we can get to the actual problem we're trying to solve . In this table…

内容