
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
This introduction outlines this comprehensive SQL course designed for beginners to advanced learners, led by Ramesh, a data engineer with 25+ years of experience. The course includes over 100 coding exercises, a hands-on project, and uses Udemy's coding platform to simplify learning SQL without needing to install additional software.
This lecture covers the structure of the SQL course, divided into beginner, intermediate, advanced sections, and a project. It features hands-on coding exercises, starting with basic queries and advancing to complex topics. A project on the Indian Premier League cricket tournament lets you apply your skills. Beginners should follow the course in order, while experienced users can skip to relevant sections.
A PDF version of the course slides are attached to this lecture.
This lecture introduces SQL, a domain-specific language designed to interact with relational databases. It explains the basic concepts of databases, the role of SQL, and highlights how learning SQL on one database can generally be applied across others due to standardized SQL with minor variations.
This lecture explains how Udemy's platform integrates coding exercises for learning SQL, using SQLite. Students can write SQL queries in an online interface without needing to install software, while built-in tests provide feedback and solutions to ensure progress. The lecture also walks through an example of using the platform's coding tools.
This section teaches how to create, insert, update, and delete data in SQL tables, while introducing best practices for writing SQL. It includes practice exercises and challenges to reinforce these concepts.
In this lecture, you'll learn how to create a database table using SQL, exploring how columns, data types, and table structures in SQL correspond to spreadsheets. It walks you through building a simple "population" table, while covering essential concepts like data types and correct syntax.
This lecture covers best practices for writing clean and maintainable SQL code, emphasizing the importance of formatting, indentation, and proper use of casing. It demonstrates how to structure SQL statements, use comments effectively, and follow industry standards to improve readability and organization of your SQL scripts.
This lecture teaches how to insert data into a SQL table using the INSERT statement. It explains the syntax, the importance of matching column names with values, and best practices such as specifying the column list to improve code readability and future-proof the script. The lecture also demonstrates inserting a record into the "population" table and viewing the data using a simple SELECT query.
This lecture demonstrates how to insert multiple records into a SQL table using a single INSERT statement. It shows how to efficiently add data for multiple countries by listing each set of values and separating them with commas. The lesson also explains the importance of correct syntax and provides a live example of inserting multiple records into the "population" table.
This lecture introduces the SELECT statement in SQL, which is used to query data from a table. It explains the basic structure of a SELECT statement, including how to choose specific columns, use the wildcard * to select all columns, and best practices for avoiding SELECT * in production code. The lecture also provides examples of querying data from the "population" table and demonstrates how to adjust column order in the result.
This lecture introduces the WHERE clause in SQL, which is used to filter results when querying a table. It demonstrates how to retrieve specific records, such as the population of a single country, by adding conditions to the SELECT statement. The lecture explains the use of comparison operators like = and highlights the importance of readability in writing SQL queries.
This lecture explains how to update data in a SQL table using the UPDATE statement. It demonstrates updating specific records by using the SET clause to modify column values and the importance of the WHERE clause to target specific rows. The lecture also emphasizes that omitting the WHERE clause can unintentionally update all records in the table. A practical example shows how to update the population of a country in the "population" table.
This lecture introduces the DELETE statement in SQL, which is used to remove records from a table. It explains how to delete specific records using the WHERE clause, and the potential risk of omitting the WHERE clause, which would delete all records in the table. A practical example shows how to delete a single record from the "population" table and demonstrates the consequences of deleting without a WHERE condition.
This lecture explains how to remove an entire table from a database using the DROP TABLE statement in SQL. It emphasizes that this operation permanently deletes both the table and its data, and it cannot be undone. A practical example demonstrates dropping the "population" table and the resulting error when attempting to query a table that no longer exists.
This lecture introduces the key components of the SQL SELECT statement, explaining how it can retrieve, filter, group, and sort data from one or more tables. It briefly covers important clauses like WHERE, GROUP BY, HAVING, ORDER BY, and LIMIT, which add further functionality to the basic SELECT and FROM structure. The upcoming lessons will explore each of these clauses in detail, starting with the SELECT, ORDER BY, and LIMIT clauses in this section.
This lecture dives deeper into the SELECT clause in SQL, showing its versatility beyond just retrieving columns. It demonstrates how to select single or multiple columns, use literal values, apply expressions (like dividing populations by a million), and incorporate functions (like converting text to uppercase). The lecture also explains how to combine these elements for more complex queries, providing examples to illustrate these capabilities in practice.
This lesson introduces the use of column aliases in SQL to rename columns in the query result. Aliases can be added directly next to the column or with the optional AS keyword for clarity. The lesson demonstrates how aliases improve readability, especially when using functions or expressions, by providing clearer column names in the result set. Examples show how to rename columns like "country" to "country_name" and use aliases with functions and expressions for better presentation of the data.
This lesson introduces the DISTINCT keyword in SQL, which is used to remove duplicate records from the result set of a query. It explains how DISTINCT works by applying to the entire record in the result, not just individual columns, and that it operates on the result set, not directly on the data in the table. The lesson includes practical examples, such as removing duplicate country records and showing how DISTINCT works when applied to specific columns like country names.
This lesson introduces the various options for the FROM clause in SQL, which specifies the data source for a query. While we've used only table names so far, the FROM clause can also reference views, temporary tables, multiple tables for joins, and subqueries. The lesson provides an overview of these options, with in-depth explanations to follow in later sections of the course.
This lesson covers the ORDER BY clause in SQL, which is used to sort query results in either ascending (ASC) or descending (DESC) order. By default, results are sorted in ascending order if no sort direction is specified. The lesson demonstrates how to apply ORDER BY to a single column, such as sorting by country name or population, and explains how to explicitly set the sort order or leave it as the default. Examples show how to sort both text and numeric data.
This lesson explains how to use the ORDER BY clause to sort query results by multiple columns in SQL. You can specify each column and sort order, separated by commas, to control the sorting. The lesson demonstrates sorting by continent in ascending order and country in descending order. Additionally, it introduces positional sorting, where you use column positions instead of names, but warns against using this method due to potential maintenance issues. The lesson includes practical examples to illustrate both methods of sorting.
This lesson covers the LIMIT clause in SQL, used to retrieve a specific number of records from a result set. The lesson shows how to use LIMIT alone or with ORDER BY to get specific records, such as the most populous countries. Practical examples demonstrate its usage and flexibility.
This lesson focuses on the WHERE clause in SQL, which is used to filter specific records from a result set. It allows you to retrieve data based on conditions, such as finding the population of a single country or all countries in a specific continent. The lesson introduces common operators like =, >, <, !=, along with BETWEEN, LIKE, and IN, which help form conditions in the WHERE clause. You'll also learn about negating conditions with NOT. The upcoming lessons will cover each operator in detail.
This lesson expands on the use of comparison operators in the SQL WHERE clause, including >, >=, <, <=, and !=, to filter data. It explains how to retrieve records like countries with populations greater than or equal to a specific value, and how to exclude specific records, such as countries other than China. The lesson also demonstrates both forms of the "not equal to" operator (<> and !=). Practical examples illustrate filtering data based on these operators to achieve specific query results.
This lesson covers the BETWEEN operator in SQL, which is used to filter records within a specific range of values. The syntax requires the start value followed by the keyword AND, then the end value. It's important to list the lower value first, as reversing the order will return no results. The BETWEEN operator is inclusive, meaning it includes both the start and end values in the results. Practical examples demonstrate filtering countries with populations between specific values.
This lesson introduces the LIKE operator in SQL, which is used to search for specific patterns in a column. It allows you to find records that match patterns using wildcard characters, such as % (representing zero, one, or more characters) and _ (representing exactly one character). The lesson also emphasizes that pattern matching is case-sensitive in most databases.
This lesson introduces the _ (underscore) wildcard in the LIKE operator, which matches exactly one character in a pattern. It differs from the % wildcard, which matches zero or more characters. Practical examples demonstrate the power of the underscore wildcard in pattern matching.
This lesson demonstrates how to combine both the % and _ wildcard characters in SQL's LIKE operator for more advanced pattern matching. The % represents zero, one, or more characters, while _ represents exactly one character. Combining both wildcards allows for more complex pattern searches within SQL, making the LIKE operator even more powerful for matching specific patterns in data.
This lesson introduces the IN operator, which allows you to filter results based on a list of multiple values, similar to the = operator but more versatile. The syntax involves the column name followed by the IN keyword and a list of values enclosed in brackets. The query returns any records where the column matches one of the values in the list. This operator simplifies filtering for multiple values within a single query, and you can include as many values as needed in the list.
This lesson introduces the AND keyword in SQL, which allows you to combine multiple conditions in a WHERE clause. By using AND, you can filter data based on more than one condition, ensuring that all specified criteria are met. This is useful when working with larger datasets where multiple filters are necessary to retrieve the desired results.
This lesson introduces the OR keyword in SQL, which allows you to join multiple conditions in a WHERE clause. Unlike AND, where all conditions must be true, OR returns data if at least one of the specified conditions is met. This is useful when you want to retrieve records that satisfy any of the given criteria, rather than requiring all conditions to be true.
This lesson explains how to combine AND and OR conditions in SQL queries. When mixing these conditions, it's crucial to use parentheses to control the order of evaluation. Without parentheses, the SQL engine processes the conditions sequentially, which can lead to unexpected results. Proper use of parentheses ensures that conditions are grouped logically, retrieving accurate query results.
This lesson introduces the NOT keyword in SQL, which is used to negate conditions in queries. It allows us to retrieve records that do not match a specific condition, like excluding certain values from a list using NOT IN, or filtering out records that do not match a pattern with NOT LIKE. The NOT keyword can also be combined with operators such as BETWEEN, enabling queries to return results outside a specified range. This flexibility makes it easier to filter data when the goal is to exclude certain results.
In this lesson, we explore how to apply filters to UPDATE and DELETE statements in SQL, similar to how filters are used in SELECT statements. Filters can target specific rows for updating or deleting, and you can use conditions like = or LIKE, combined with AND and OR. These filters allow for precise modifications and deletions, ensuring data accuracy.
Welcome!
I am looking forward to helping you to become proficient in SQL, one of the fundamental skills required to become a data professional. SQL is one of the important skill required to become data engineer, data analyst, data scientist, web developer, application developer etc. So, if you aspire to be a competent data professional, this is course is for you!
Course Approach:
This is a comprehensive hands-on course with 120+ SQL coding exercises and a Real World Project of building a database for one of the popular sporting tournaments, and writing all the SQL statements required for the tournament website.
I have combined my experience working with SQL in the industry for 25 years with teaching on Udemy for 160,000 students to create this comprehensive curriculum. Throughout the course, I provide guidance on using best practices for writing SQL statements and also take you through real world examples.
I value your time as much as I do mine. So, I have designed this SQL course to be fast-paced and to the point. Also, the course has been taught with simple English and no jargons. I start the course from basics and progress to complex topics, and by the end of the course you will be proficient in SQL.
Comprehensive Curriculum:
Beginner Level Topic:
Introduction to Databases and SQL
Basics of SQL statements
Querying Data
Filtering Data
Intermediate Level Topic:
Simple SQL functions
Date Functions
Conditional Expressions & Functions
Aggregate Functions
Grouping Data
SQL Joins
SQL Constraints
Primary & Foreign Keys and Relationships
Advanced Level Topic:
Database Design & Entity Relationship Diagrams
Subqueries
Common Table Expressions (CTEs)
Views
Window/ Analytical Functions
Project:
Requirements gathering & Database Design
Writing SQL Queries for a Website
ANSI SQL:
This course follows the ANSI standard for SQL. So, once you complete the course, you will be able to with with SQL on all major databases such as MySQL, PostgreSQL, SQLite, Oracle, SQL Server etc, and also with any big data and parallel processing engines such as Spark SQL, Hive SQL, Snowflake, Google BigQuery, Azure Synapse etc.
Course Outcome:
Once you have completed the course including all the SQL coding exercises and the project, I genuinely believe that you will be in a position to start working in a real world data project using SQL.
Student Feedback:
Here are some of the reviews from existing students which may help you make the decision, but also please feel free to go through the reviews from others at the bottom of this page!
Ayantika N [5*] - This is my first-hand experience with SQL. I thoroughly enjoyed the course, especially being a student with no background in computer language. I found the course well-thought out and beneficial for me. The hands-on examples are really well explained. I look forward to coming back to your courses in future as well. Kudos to you!! :)
Mayank S [5*] - A very comprehensive course which starts with the basics then slowly moves on to intermediate and advanced concepts. The best part is the practice exercises to solidify one's understanding. Easy to follow along.
Ritesh T [5*] - I have purchased all his courses. The best part of him is that, he explains the concepts + the use cases where it would be used. Just like his databricks, azure df, azure synapse courses, the theories are there as well as the scenarios where such concepts could / would / should be used. There are times when a student like me who is working on live projects could use a particular concept, and bingo, his lectures come life saving.