Introduction to SQL
Author: Alina Myronets
This course is for you if you are new to SQL, you want to quickly learn how to get the most out of SQL and you want to learn how to use SQL in your own application development.
Complete all chapters to get certificate
In this section, we will learn how to use the SQL SELECT statement to get a single table column, multiple table columns, and all table columns. We will also find out how to return unique values.
Retrieving Individual Columns
Retrieving Multiple Columns
Retrieving All Columns
Retrieving Distinct Rows
Challenge: Find the Population of the Countries
Challenge: Find All Countries
Challenge: Find All Countries With Their IDs
Challenge: Find Country Capitals
Challenge: Find the Regions in Which All Countries Are Located
Sorting Retrieved Data
In this section, we will learn how to sort retrieved data using the ORDER BY clause. This clause, which must be the last in the SELECT statement, can be used to sort data on one or more columns as needed.
Sorting by Multiple Columns
Specifying Sort Direction
Challenge: Sort the Countries by Region and Capital
Challenge: Sort Capitals in Descending Order
Challenge: Sort Countries in Ascending Order
Challenge: Find Countries, Their IDs, and Their Populations
Challenge: Find Countries, IDs, Populations, Regions, and Sort Them
Challenge: Find All Continents and Sort Them in Ascending Order
In this section, we will learn how to filter returned data using the SELECT statement’s WHERE clause. We will learn how to test for equality, inequality, more and less significant than value ranges, and NULL values.
Using the WHERE Clause
The WHERE Clause Operators
Checking for a Range of Values
Checking for NO Value
Advanced Data Filtering
In this section, we will learn how to combine WHERE clauses with the AND and OR operators. We will also find out how the NOT operator works.
Using the AND Operator
Using the OR operator
Using the NOT Operator
In this section, we will learn what the SQL aggregate functions are and how to use them to summarize table data.
The AVG() Function
The COUNT() Function
The MAX() Function
The MIN() Function
The SUM() Function