
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn SQL basics in this interactive, no-setup course, with Udemy exercises to practice starting with select statements, filtering with where, joining tables, aggregate functions, and window and analytic functions.
Explore how SQL powers querying relational databases, with tables, rows, and columns, and learn why SQLite is used for hands-on exercises, while the core SQL concepts stay consistent across dialects.
Learn the basics of a simple sql query by selecting all columns from the courses table. Explore related tables: courses, instructors, enrollments, and understand select, from, semicolon, and SQL keywords.
Practice writing your first sql query to retrieve all data from the courses table, using select star from courses, and learn through hints and solution videos in udemy's coding exercises.
Retrieve all data from the instructors table using select star and learn how to link courses and instructors via the instructor_id, including first name, last name, country, and partner status.
Explore pragma table_info in SQLite to inspect a table's schema and learn its columns and data types without executing a select.
Inspect SQLite table schemas using pragma table info for the courses and instructors tables, revealing columns, data types, and boolean indicators (0/1) to understand structure and nullability.
Use limit at the end of a select query to print the first three rows, enabling quick, resource-efficient insights into a table's structure.
Execute select all columns from enrollments with limit ten to fetch the first ten rows, speeding up queries on large tables and avoiding long scans.
Learn to limit results to the first ten rows and fetch only desired columns by listing comma-separated column names instead of using select star.
Select only the relevant columns to optimize query performance and readability, retrieving instructor_id, country, and is_partner from the instructors table for an anonymized data set.
apply order by to sort query results by release date, presenting selected columns in chronological order and making timing of events easier to understand.
Retrieve all columns from the instructors table and sort results by last name in ascending order, exploring sorting by instructor id, is partner, numbers, and dates.
Learn how order by sorts data by default in ascending order and how to switch to descending using the desc option. See examples for numeric, alphabetical, and date data.
Retrieve all enrollments from the enrollments table, sort by amount paid in descending order, and limit to the top ten highest payments to analyze course profitability.
Sort data by multiple columns using order by, starting with the first column and then the second column to break ties when present, with practical practice.
Learn to query the courses dataset by selecting all columns and sorting first by category and then by subcategory, with options to break ties by course name or release date.
Use select distinct to remove duplicate values and obtain a list of unique course categories in SQL for data science bootcamp.
Use select distinct to retrieve a list of unique course categories from the courses table, producing a streamlined overview with no repeats for thousands of courses.
Learn to use select distinct to pull unique first names and order them by first name, then extend to distinct across first name, last name, and category.
Learn to retrieve all unique category and subcategory combinations from a courses table using select distinct on multiple columns. See how science chemistry and science biology appear as distinct pairs.
Learn aliasing in SQL by using as to rename columns, such as changing release date to debut.
Practice aliasing to rename the student ID as learner ID while selecting all columns from enrollments and restricting results to ten rows, reflecting the lifelong learning shift.
Learn how aliasing creates new columns from calculations, using as to label them, such as a discounted price equal to price times 0.9.
Learn how to use aliasing to add a new column profit, calculated as 40% of the amount paid, when querying enrollments in SQL.
Learn to use union and union all to stack enrollment tables and manage duplicates, while understanding how each handles repeats and null data.
Use union to stack categories and subcategories from the courses table into a single list, automatically removing duplicates; note that distinct yields the same result.
Apply the where keyword to filter data by a criterion and return only matching rows. For example, query the courses table where category equals math to list math courses.
Practice filtering data with a SQL where clause to retrieve all columns from courses where category equals math. Verify that only math courses appear in the results.
Explore filtering with comparison operators such as >, <, >=, <=, and not equal to, and apply them to numbers and dates for flexible SQL queries.
Practice filtering enrollments with a where clause by selecting all columns from the enrollments table where amount_paid is greater than or equal to 100, then explore high-value enrollments.
Apply logical operators and, or, and not to refine SQL filters for multiple criteria, such as combining category and release date to return math courses or recently released titles.
Filter the courses table by excluding science and math categories, retrieve all columns to show humanities, art, and programming courses, using not equal to and functions to apply multiple filters.
Master range filtering by using the between keyword to select rows where a number is between 1 and 5, a shorter alternative to a where clause, also applicable to dates.
Practice using between 90 and 95 to filter the enrollments table by amount paid, retrieve all columns, and sort results in ascending order.
Use the in operator to match values in a list, replacing long or chains with concise in (list) queries for instructor IDs and categories.
Practice building sql queries using the in keyword to filter the courses table by math or science categories, retrieving all columns.
Identify and filter null values using is null and is not null to separate missing data from existing data, such as reviews with or without comments.
Explore handling null values in SQL by using is null to filter courses with no subcategory, retrieve all columns from courses, and discuss data quality issues and practical fixes.
Isolate null values to diagnose missing data, then return all columns from the courses table where the sub category is not null, illustrating exclusion of the 51st course.
This course offers a deep dive into SQL's capabilities, giving you the skills to query, manipulate, and combine data sets.
Using Udemy's built-in coding exercises, we will go from zero knowledge to advanced mastery of SQL, seeing how SQL is used in real-life data science situations. We will work together as data scientists for a fictional educational technology company and learn how to use SQL to answer questions regarding our instructors, students, and courses.
Unlike other courses, we will start coding in SQL immediately, with no software installation required.
Course Features:
Short video lectures that introduce each topic
40 hands-on coding exercises complete with solutions, ensuring you get the practical experience to master SQL
Quizzes to assess and reinforce your understanding.
What You'll Learn:
What is SQL, and why are there dialects like SQLite, PostgreSQL, MySQL and others?
Basic SELECT statements
ORDER BY
WHERE
Joining tables with INNER JOIN and LEFT JOIN
Aggregation functions like COUNT, SUM, and AVG to derive meaningful statistics.
Advanced window functions with OVER and PARTITION BY
and more!
Who Should Enroll:
Current or aspiring data scientists and data analysts
Anybody who wants to learn SQL with interactive exercises and full video solutions with detailed explanations.