Please enable JavaScript to use CodeHS

Outline


1. Hour of SQL
1.1 What is SQL?
Video 1.1.1 Intro to SQL
Quiz 1.1.2 Quiz: What is SQL?
1.2 Structuring Data in SQL
Video 1.2.1 How to Structure Data in SQL
1.3 Basic Querying in SQL
Video 1.3.1 The SELECT Statement
Example 1.3.2 Our first SELECT statement
Exercise 1.3.3 Your first SELECT statement
Video 1.3.4 More SELECT Statement
Example 1.3.5 Selecting specific columns examples
Exercise 1.3.6 Harry Potter Names
Exercise 1.3.7 Harry Potter Last Names
1.4 Filtering Queries in SQL
Video 1.4.1 The WHERE Clause
Example 1.4.2 Ravenclaw House
Example 1.4.3 People in Gryffindor
Example 1.4.4 Filter By ID
Exercise 1.4.5 The Weasleys
Exercise 1.4.6 The Potters
Quiz 1.4.7 Quiz: Condition Operators
1.5 Advanced FIlters
Video 1.5.1 Compound and Advanced Filters
Example 1.5.2 Compound Filters Example
Example 1.5.3 BETWEEN, LIKE, IN Examples
Exercise 1.5.4 The Patil in Ravenclaw
Exercise 1.5.5 Using BETWEEN
Badge 1.5.6 Hour of SQL Badge
2. SQL Part II: The SQL
2.1 More Filtering Practice
Exercise 2.1.1 Initials
Exercise 2.1.2 Compound Queries with BETWEEN
Exercise 2.1.3 Gryffindors With G Names
Exercise 2.1.4 R First Names
Exercise 2.1.5 FF Houses
2.2 Ordering Results
Video 2.2.1 The ORDER BY Keyword
Notes 2.2.2 ORDER BY
Example 2.2.3 ORDER BY First Name
Example 2.2.4 Reverse Order
Example 2.2.5 Order By Multiple Fields
Exercise 2.2.6 House Ordering
Exercise 2.2.7 Sort the P Names
2.3 Renaming Fields
Notes 2.3.1 Renaming Fields with AS
Example 2.3.2 Renaming in the House Table
Exercise 2.3.3 Changing Column Names
2.4 Joining Tables
Video 2.4.1 The JOIN command
Notes 2.4.2 Basic Joining
Example 2.4.3 Letters and Numbers
Example 2.4.4 Person and House
Example 2.4.5 Person and House (Correct)
Example 2.4.6 Person and House (with namespacing)
Exercise 2.4.7 List All Gryffindors
Video 2.4.8 JOIN With Yourself
Notes 2.4.9 Renaming Tables
Example 2.4.10 Quidditch Matchups
Exercise 2.4.11 Quidditch Matchups: Ravenclaw Away Games
2.5 More Joining Tables
Example 2.5.1 The Course Table
Exercise 2.5.2 Courses and Professors
Exercise 2.5.3 Courses, Professors, and Houses
Exercise 2.5.4 Courses Taught By Gryffindors
Example 2.5.5 The Enrollment Table
Exercise 2.5.6 Students Taking Potions
Exercise 2.5.7 Non-Slytherins Taking Potions
Exercise 2.5.8 Defense Students by House
Exercise 2.5.9 Neville's Courses
3. SQL Functions
3.1 Counting in SQL
Notes 3.1.1 The COUNT Function
Example 3.1.2 Number of Houses
Exercise 3.1.3 Number of Weasleys
Exercise 3.1.4 Number of Students in Transfigurations
Exercise 3.1.5 People with Z names
3.2 Grouping
Video 3.2.1 The GROUP BY Clause
Notes 3.2.2 Grouping Results
Example 3.2.3 People in Houses
Exercise 3.2.4 Course Enrollments
Exercise 3.2.5 How Many Hufflepuffs?
Exercise 3.2.6 Houses of Professors
3.3 Filtering Calculations
Notes 3.3.1 How to Filter with HAVING
Example 3.3.2 Popular Houses
Exercise 3.3.3 Full Courses
Exercise 3.3.4 Families
Exercise 3.3.5 C-Courses
3.4 Limiting
Notes 3.4.1 LIMIT
Example 3.4.2 LIMIT Examples
Exercise 3.4.3 Graduation
Exercise 3.4.4 Bookworms
Exercise 3.4.5 Rate My Professor
4. Data Aggregation
4.1 House Points
Notes 4.1.1 The HousePoint Table
Example 4.1.2 HousePoint Table
Exercise 4.1.3 HousePoints With Houses
Exercise 4.1.4 Gryffindors With House Points
Exercise 4.1.5 Negative Points
4.2 Summing Points
Notes 4.2.1 The SUM Function
Example 4.2.2 SUM Example
Exercise 4.2.3 Harry's Points
Exercise 4.2.4 Snape, Snape, Severus Snape
Exercise 4.2.5 Ravenclaw Points
4.3 Point Distributions
Exercise 4.3.1 Best Students
Exercise 4.3.2 Debbie Downer
Exercise 4.3.3 House Cup Standings
Exercise 4.3.4 House Cup Winner
Exercise 4.3.5 The Best Weasley
Exercise 4.3.6 Inter-House Points
Badge 4.3.7 SQL Badge