
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn SQL to manipulate data with core statements like select and join, create tables, insert data, and build simple data pipelines through hands-on coding, quizzes, and exercises.
In this lecture, we'll learn how to setup MySQL Server and Workbench, the software we'll need for this course.
This lecture contains some information on how to setup MySQL on Mac.
This lecture contains some instructions on how to spin up MySQL Server from scratch (on Windows). This is relevant if you've decided not to check "start SQL Server automatically" in the install process.
We'll use the Sakila sample database throughout the course. In this lecture, we'll learn how to set it up correctly.
Learn to write basic select statements in SQL, using from clauses to query a local secure database, select all or specific columns, run queries, and read execution results and errors.
Explore column and table aliases in SQL, renaming outputs with as, using table aliases like f to simplify joins, and improving query readability.
Apply simple filters to a database table using the where clause to return rows by title, and practice equality and inequality comparisons with selected columns.
Master multi-filter queries by using and/or clauses and the in keyword to select multiple movie titles, handle numeric release years, and prepare for advanced filtering.
Learn to filter SQL results using comparison operators, including less than, less than or equal, greater than, greater than or equal, and equal, with numeric and text columns.
Add a new column with a constant value for all rows, setting person role to actor in the sequela table and showing how to append more values with comma syntax.
Learn to create a new column by combining existing first and last names using SQL functions, such as concatenation, and alias the result as full name for each row.
Learn to create new columns in SQL using mathematical expressions, with row-by-row arithmetic, operator precedence, and functions like log and string concatenation to derive aliased values.
Learn to use group by to compute average, max, and min by rating and other dimensions, producing grouped statistics such as average movie length by rating.
Learn how the having clause filters results after aggregation, using group by and aggregate expressions. Discover how to filter on computed columns like average length created by aggregates.
Learn how the order by clause sorts movie data by length or title, with ascending and descending options, and how to combine multi-column sorting with numeric and text fields.
Explore a case-study of basic querying with practical SQL exercises on the Books and Books database, including selecting books released after 2000, calculating mean pages, and creating derived columns.
Work through a SQL case study by solving exercises on the books and authors tables, learning selects, filters, group by, averages, counts, aliases, having, and concatenation.
Learn to complete sql coding exercises on Udemy with immediate feedback, using a transactions table, practice selecting data, filtering by product category, and debugging common syntax errors.
Learn about integer data types in SQL, including tiny, small, and medium ints, and how unsigned and signed ranges influence storage and calculations.
Explore decimal numbers and the decimal data type, focusing on precision, digits left and right of the decimal, and when to use numeric or float for calculations and money.
Explore text data types in SQL, comparing varchar and text, understanding length limits and indexing, and practice with enum and set to control inputs.
Explore date and time data types in SQL, including year and timestamp, and learn to use date diff to calculate differences such as last update for transactions.
Discover how SQL applies implicit conversions when operating on character data, including when quotes indicate strings and numbers are inferred for functions like log, and compare to explicit conversion.
Explore explicit conversions using convert and cast, turning strings into numbers or decimals, and compare implicit and explicit conversions, with seven supported data types.
Explore data types through a theoretical case study of the books and authors tables, describing the books table and analyzing book name, author first name, keys, and conversions.
Learn to describe the books table to inspect data types and primary keys, explain varchar(255) limits, and discuss signed versus unsigned columns and their implications.
Learn to create a new database and its schema, such as countries, connect to the local server, and create and insert information into tables.
Learn to create tables in SQL by defining a countries table with a primary key, unsigned tinyint, not null, and other columns like name, foundation_date, and population.
Insert data into a table by specifying columns and values, including name, foundation date, and population, use auto-incremented id, and validate data types.
Insert rows into tables by specifying columns and using multiple insert into values, and observe the auto incremented country id and primary key constraints.
Learn common pitfalls when inserting data in SQL, including enforcing data types, handling out of range and implicit conversions, and validating text length with three-letter country codes.
Learn how to delete data from specific tables using delete from with where conditions, wipe entire tables with drop table, and understand the destructive risks and safety notes.
Learn how to alter tables by dropping, adding, renaming columns, and changing data types, and rename tables to reshape the underlying database structure.
Engage in a hands-on case study creating and modifying stores table in the books database. Practice insert, delete, and alter table operations, including capacity changes and adding a region column.
Follow along with a case study to create and modify sql tables, insert data, and manage schemas using commands like create table, alter table, insert, delete, and add region columns.
Discover how to complete Udemy SQL exercises by placing changes between specific lines and including the 'don't change anything after this line' marker for evaluation.
Combine rental and customer data by joining on customer id to show rentals with customers' first and last names. Use inner joins, left joins, and unions.
Explore how inner join returns only rows with matching keys in both tables, using a customer id example, and contrast it with left and right joins.
Discover how left and right joins merge customer and country data, with the master table guiding join direction and null results when no match exists on the opposite side.
Define a composite key by combining two or more columns, such as customer_id and month, to uniquely identify rows; learn how to declare a composite primary key in table creation.
Explore how composite keys in joins prevent duplicates by matching customer_id and month. See how inner and left joins differ and why accurate key usage matters for analysis.
Learn how to stack similarly structured tables with the union and union all operators, ensure matching columns, and understand how duplicates are handled when combining store invoices.
Explore a case study on combining tables with joins and union operators, linking invoices to products and stores and adding a discount to invoices_new.
Learn to build and query a books and invoices database by creating tables, inserting data, and performing inner and left joins, stacking joins, and unions; extend with a discount column.
Explore subqueries in sql by nesting select statements, joining language data, and calculating average movie length by language, showcasing how to build and query derived results.
Master subqueries in sql by building grouped totals, counting distinct customers by staff, and calculating average spend from payments, using from clauses and inner queries.
Learn to insert data into a SQL table from a select statement, combine insert into with select, and manage duplicates using select distinct for efficient data population.
Create a target table for movies, insert into it from another table using select of multiple columns (film, title, description), and verify data types to prevent mismatches.
Practice advanced select statements through the books and invoices case study, using subqueries in filters and insert into with select to reinforce filtering and data manipulation.
Demonstrates code-along SQL solutions to filter books by invoices, apply subqueries for averages, and perform insert, delete, and select operations across invoices and books.
Update set and where commands power data changes in SQL tables, demonstrated by modifying a student's favorite class in a sandbox table using update to alter a single row.
update multiple rows at once by using an update query with a where condition (or) to set the favorite class to arts for selected students, mirroring filtering concepts.
Master updating multiple columns with a single update, using comma-separated sets, while applying a precise where clause to target rows and ensure data type compatibility to avoid invalid updates.
Update tables in case study using recreate books.sql, set safe_updates to 0, then update invoices and books, years for Yuval or Nassim to 2012 and pages for George to 400.
Explore a SQL case study with code-along solutions, updating data across invoices and books, using multi-column updates, safe updates, and or in clauses for filtering.
Explore the not operator and advanced filtering in SQL by negating in conditions, combining not with and or, and understanding operator precedence for precise queries.
Explore operator precedence and order of operations in SQL, and learn to use parentheses to group conditions with and and or, using chemistry, age, and favorite classes as examples.
Discover how to use wildcards with the like clause in SQL to match text patterns, using percent and underscore to filter names that end with Smith or contain John.
Explore SQL transactions, variables, and simple procedures in MySQL, using bank balance and transaction tables to illustrate commit and rollback.
Explore auto commit versus manual commit in MySQL, and how transactions and variables influence data persistence, states, and the commit command.
Explore SQL variables with a bank transaction example, define local variables, use set to assign values, and apply variables in insert and update statements while managing commit behavior.
Understand SQL transactions and rollback by exploring start transaction, commit, and rollback within a money transfer scenario, and learn why procedures improve control.
Explore sql procedures and how to use select into variables within a bank transaction scenario, including committing or rolling back based on balance, and setting variables from select statements.
Learn to implement SQL procedures with if-else control flow, start transaction, and manage rollback and commit to safely update balances and transactions.
Learn to generalize SQL procedures by adding arguments, defining parameter names and types, and calling the procedure with transaction id, customer id, value, and description to update balances and records.
So, you've decided that you want to learn SQL or you want to get familiar with it, but don't know where to start? Or are you a data/business analyst or data scientist that wants to power up your data skills by performing queries with Structured Query Language?
Then, this course was designed just for you!
This course was designed to be your first step into the SQL programming world! We will delve deeper into the concepts of SQL queries, understand the MySQL user interface and play around with several datasets. This course contains lectures around the following groups:
Code along lectures where we will go step-by-step in each instruction, compounding our SQL knowledge.
Test your knowledge with questions and practical exercises with different levels of difficulty!
Analyze real datasets and understand the thought process from question to SQL code solution!
This course was designed to be focused on the practical side of coding in SQL - instead of teaching you every possible function out there, we'll learn all the fundamentals slowly and build our knowledge from scratch. We'll use a case study to cement every concept we will learn, so that you can have a hands-on learning process, making it easier to apply the concepts in your projects.
At the end of the course you should be able to use SQL to build and manipulate tables. Along the way we will also learn the most important SQL statements such as GROUP BY, INSERT INTO or CREATE TABLE.
Here are some examples of things you will be able to do after finishing the course:
Join different tables using SQL;
Create your own tables with the appropriate structure.
Use different data types according to their characteristics.
Create columns using data available from your existing tables.
Use subqueries, building complex instructions.
Join thousands of professionals and students in this SQL journey and discover the amazing power of this querying language.
This course will be constantly updated based on students feedback.