Review & Practice with SQL Playgrounds1:50 with Andrew Chalkley
In this video we'll review some of the concepts that we've covered in this stage and cover what you'll need to do to in your practice session.
In the previous videos, we've used a library database and 0:00 selected all information from a table. 0:03 We've used specific column names to sort and 0:06 limit the columns of information we want back. 0:08 We've also used the AS keyword to alias column names. 0:11 These are all important tools that you can use to retrieve 0:15 results from a database to show to users and generate reports. 0:18 Here's something you might not know. 0:23 You see all these keywords select, as, and from? 0:24 They can be all used in lowercase. 0:28 Running this query has the same results, but people use 0:31 uppercase keywords to help you distinguish the different paths of the query. 0:35 The uppercase keywords make SQL more readable and is an industry best practice. 0:39 Let's switch it back. 0:45 [SOUND] That's better. 0:46 Now that we've reviewed what we've learned so far, 0:50 let's jump into a practice session. 0:52 Launch the SQL Playground associated with this video and 0:55 we'll take a look at what we have here. 0:58 This is a new database with new tables. 1:00 Take a look at the database schema section, and 1:04 we have a couple of tables here. 1:08 We have an actor's table, a movies table, and a reviews table. 1:10 And we have the columns for each of these tables. 1:14 In each of these coding areas here, there's a task for you to perform and 1:18 practice what you've learned. 1:22 These lines starting with the double dash are comments. 1:25 These don't get executed. 1:29 Comments are used for helping people document their SQL queries. 1:31 In this case, I've left questions for you to answer in SQL code. 1:36 Once you're comfortable with the basics of selecting, 1:41 you can move on to the next step in the course. 1:44 If you're feeling rusty, you can always come back again and practice. 1:47
You need to sign up for Treehouse in order to download course files.Sign up