Hands-On with SQL

Learn SQL by stepping into the role of a data scientist for two fictional companies.


Jason Bellinger
Jason has worked for start ups in New York City for nearly 8 years. At his first job at a small software company, he taught himself SQL and struggled with it for a long time until figuring out the right strategies for learning. Come discover the techniques he found!

Contents

Name Type Steps
SQL Query Basics Lesson 1
Retrieving Data Challenge 1
Audit the Orders Challenge 1
Keeping Privacy While Retrieving Data Challenge 1
SQL Specifying Your Results Lesson 1
Working with the SUBSCRIPTIONS Table Challenge 1
Filtering Cancellations Challenge 1
Filtering for the Yearly Premium Package Challenge 1
Math with SQL Lesson 2
Finding Revenue per Day Challenge 1
Finding Incorrect Order Totals Challenge 1
Checking the Current Inventory Level Challenge 1
Bringing it All Together: SQL Basics Challenge 5
SQL Logical Operators Lesson 2
Commonalities in High Value Orders Challenge 1
Replenishing Low Stocked Items Challenge 1
Finding Order Records Challenge 1
SQL Logical Operators - AND & OR Lesson 2
Checking on Low Inventory Products Challenge 1
Reaching Out to Customers Who Cancelled Their Subscriptions Challenge 1
Researching Subscriptions from a Specific Date Challenge 1
SQL Logical Operators - LIKE Lesson 3
Analyzing Customers' Email Addresses with Specific Domains Challenge 1
Analyzing Customers' Email Addresses without Specific Domains Challenge 1
Finding Email Addresses with "Bad Data" - % Symbol Challenge 1
SQL Logical Operators - IN Lesson 1
Researching the Success of Premium Plans Challenge 1
Targeting Ads Based on Location Challenge 1
SQL Logical Operators - BETWEEN Lesson 1
Finding the Subscriptions About to Expire Challenge 1
Finding Orders within a Specific Time Period and Amount Challenge 1
Bringing it All Together: Logical Operators Challenge 5
SQL Null Values Lesson 1
Finding Orders That Were Not Refunded Challenge 1
Finding Orders That Were Refunded Challenge 1
SQL Putting Results in Order Lesson 1
Pull a Report of Items with Lowest Inventory on Top Challenge 1
Pull a Report of Items with Highest Inventory on Top Challenge 1
Pull a Report of the Most Discounted Items Challenge 1
Bringing it All Together: Null Values and Ordering Challenge 3
SQL Aggregate Functions - MAX & MIN Lesson 1
Finding the Highest Amount Refunded to a Customer Challenge 1
Finding the Exact Date and Time of the First Ever Purchase Challenge 1
Finding the Highest Order Amount Purchased Challenge 1
SQL Aggregate Functions - COUNT Lesson 1
Finding the Total Amount of Items Refunded Challenge 1
Finding the Number of Subscriptions About to Expire Challenge 1
Finding Orders that Used an AMEX Credit Card Challenge 1
SQL Aggregate Functions - SUM Lesson 1
Finding Total Revenue for an Individual Month and Year Challenge 1
Finding Total Number of Items That Haven't Been Replenished Challenge 1
Calculating the Average Order Value for the Year Challenge 1
SQL Aggregate Functions - AVG Lesson 1
Calculating the Average Order Value for the Year Using the AVG Function Challenge 1
Calculating the Average Order Quantity Challenge 1
Calculating the Percentage of Tax Challenge 1
SQL Grouping Your Data Lesson 2
Finding the Total Revenue Per Day Challenge 1
Finding the Most Total Items Sold Between Two Dates Challenge 1
Finding the Total Number of Cancellations for Each Type of Subscription Challenge 1
Finding the Total Number of Cancellations for Each Type of Subscription by Date Challenge 1
Comparing Completed and Cancelled Subscriptions Challenge 1
Bringing It All Together: Aggregate Functions & Grouping Your Data Challenge 6
SQL Using Unique Values Lesson 1
Finding Customers That Bought the Most Unique Items Challenge 1
Calculating the Average Number of Orders per Unique Customer Challenge 1
SQL Filtering Aggregated Queries Lesson 2
Finding the Customers with 3 or More Refunds Challenge 1
Finding the Items That Have Been Returned the Most Challenge 1
Finding the Customers That Have Never Cancelled Their Subscriptions Challenge 1
SQL CASE Statements Lesson 2
Finding Similarities in Orders Challenge 1
Finding How User Experience Affects Orders Challenge 1
Investigating Customer Behavior Based on Their Acquisition Platform Challenge 1
Bringing it All Together: Unique Values, Filtering Aggregated Queries, & CASE Statements Challenge 4
SQL Working with Data Types Lesson 3
Pull a Report of the Most Combined Inventory from Both Facilities Challenge 1
Find the Total Number of Items Stocked Each Day at Facility A Challenge 1
Pull a List of Users Who Started a Subscription in a Specific Month and Year Challenge 1
Finding the Last 4 Digits of Credit Cards Associated with Specific Orders Challenge 1
SQL Working With Dates Lesson 4
Helping the Marketing Team Decide on a Promotion Challenge 1
Finding the Total Revenue by Month Using the DATE_TRUNC Function Challenge 1
Finding the Total Revenue by Month Using the DATE_PART Function Challenge 1
Finding the Average Order Value for Each Day of the Week Challenge 1
Finding the Average Number of Weeks until a User Cancels Challenge 1
SQL Working With Strings Lesson 2
Researching Customers' Email Domains Challenge 1
Finding the Most Visited Product Pages using the SPLIT_PART Function Challenge 1
Combining Columns using the CONCAT and LOWER Functions Challenge 1
Bringing it All Together: Data Types, Dates, and Strings Challenge 4
SQL Joining Datasets Lesson 2
Finding the Total Revenue Brought in by Subscriptions Each Month Challenge 1
Finding the Total Quantity Sold for Each Product Type Challenge 1
Finding the Total Qualtity Returned for Each Product Type Challenge 1
SQL Outer Joins Lesson 2
Displaying Monthly Revenues and Refunds Side-by-Side Challenge 1
Displaying Quarterly Revenues and Refunds Side-by-Side Challenge 1
SQL More Join Techniques Lesson 2
Finding Products That Were Added to Customers' Orders Last Challenge 1
Finding Information on Orders for Customer Outreach Challenge 1
Finding the Total Percentage of Items Sold Challenge 1
Creating a List of Customer Email Addresses That Meet a Certain Criteria Challenge 1
Bringing it All Together: Joining Datasets, Outer Joins, and Join Techniques Challenge 4
SQL Subqueries Lesson 3
Finding Products with over 100 Items in Stock Challenge 1
Finding Customers' Email Addresses That Cancelled within a Week Challenge 1
Adding a Column to Find Total Number of Lifetime Orders Challenge 1
Using a Subquery to Find the Customers' Email Addresses with a Specific Domain Challenge 1
SQL Common Table Expressions Lesson 2
Finding the Time Elapsed between Orders Challenge 3
Using CTEs to Find a Count of Repeat Orders Challenge 1
Comparing the Number of Items Sold Each Day with the Items Returned Each Day Challenge 1
SQL UNION Lesson 3
Using a UNION to Combine Multiple Queries Challenge 1
Bringing it All Together: Subqueries, Common Table Expressions, and UNION Challenge 4
SQL Window Function Basics Lesson 3
Using a Window Function to Compare an Item's Inventory Level to the Product's Average Inventory Level Challenge 1
Analyzing Orders during Promotional Periods Challenge 1
Using a Window Function to Increment a Count for Every Order Challenge 1
SQL Window Functions - Numbering & Ranking Lesson 2
Analyzing the Sequence of Customers' Orders Challenge 1
Analyzing Customers' Second Orders Challenge 1
Analyzing Customers' Second Orders - Removing the Gaps Challenge 1
Ranking the Best States for Total Revenue Challenge 1
SQL Window Functions - Aggregates Lesson 1
Finding Revenue by Week for Each Plan Type Challenge 1
Editing Your Report to Include the Number of Subscriptions and an Overall Count by Week Challenge 1
Bringing it All Together: Window Function Basics, Numbering & Ranking, and Aggregates Challenge 3
SQL Window Functions - LAG & LEAD Lesson 1
Analyzing Key Performance Indicators: Previous Subscriptions Challenge 1
Analyzing Key Performance Indicators: Next Subscriptions Challenge 1
SQL Window Functions - FIRST_VALUE Lesson 1
Using a FIRST_VALUE Window Function Challenge 1
Bringing it All Together: Window Functions LAG, LEAD, and FIRST_VALUE Challenge 3