SQL Tutorial - Essential SQL For The Beginners
SQL Tutorial - Essential SQL For The Beginners
This SQL tutorial helps you get started with SQL quickly and effectively through many practical
examples.
If you are a software developer, database administrator, data analyst, or data scientist who wants
to use SQL to analyze data, this tutorial is a good start.
Each topic is covered clearly and concisely with many practical examples that help you truly
understand the concept and apply it to solve the data challenges more effectively.
SQL stands for Structured Query Language designed to manipulate data in the Relational
Database Management Systems (RDBMS).
Today, SQL is one of the most common programming languages for interacting with data.
What is SQL – give you a brief overview of the SQL language and its popular dialects.
SQL Syntax – provide you with the syntax of the SQL language.
SELECT Statement – show you how to query data from a single table by using the
simplest form of the SELECT statement.
DISTINCT – show you how to remove duplicates from the result set.
LIMIT – constrain a number of rows returned by a query using the LIMIT and OFFSET
clause.
FETCH – learn how to skip N rows in a result set before starting to return any rows.
Comparison operators – learn how to use the comparison operators including greater
than, greater than or equal, less than, less than or equal, equal, and not equal to form the
condition in the WHERE clause.
Logical operators – introduce the logical operators and how to use them to test for the
truth of a condition.
AND operator – combine multiple Boolean expressions using the AND logical operator.
OR operator – show you how to use another logical operator OR to combine multiple
Boolean expressions.
BETWEEN Operator – guide you to use the BETWEEN operator to select data within a
range of values.
IN Operator – show you how to use the IN operator to check whether a value is in the list
of values.
IS NULL Operator – introduce the NULL concepts and show you how to check whether
an expression is NULL or not.
NOT operator – show you how to negate a Boolean expression by using the NOT
operator.
Section 5: Conditional Expressions
INNER JOIN – introduce you to the join concept and show you how to use the INNER
JOIN clause to combine data from multiple tables.
LEFT OUTER JOIN – provide you with another kind of joins that allows you to combine
data from multiple tables.
FULL OUTER JOIN – join multiple tables by including rows from both tables whether or
not the rows have matching rows from another table.
CROSS JOIN – produce a Cartesian product of rows of the joined tables using the cross
join operation.
SELF JOIN – join a table to itself using either the inner join or left join clause.
Aggregate functions – introduce you to the most commonly used aggregate functions in
SQL including AVG, COUNT, SUM, MAX, and MIN.
GROUP BY– combine rows into groups and apply an aggregate function to each group.
HAVING – specify a condition for filtering groups summarized by the GROUP BY clause.
ROLLUP – generate multiple grouping sets considering the hierarchy of the input
columns.
CUBE – generate multiple grouping sets for all possible combination of the input
columns.
UNION and UNION ALL – combine result sets of two or more queries into a single result
set using the UNION and UNION ALL operators.
INTERSECT – return the intersection of two or more queries using the INTERSECT
operator.
MINUS – subtract a result set from another result set using the MINUS operator.
Subquery – show you how to nest a query inside another query to form a more flexible
query for querying data.
Correlated Subquery – introduce you to the correlated subquery which is a subquery that
uses values from the outer query.
EXISTS – show you how to check for the existence of the row returned from a subquery.
ALL – illustrate how to query data by comparing values in a column of the table with a
set of columns.
ANY – query data if a value in a column of a table matches one of the values in a set.
TRUNCATE TABLE – delete all data in a big table fast and efficiently.
PRIMARY KEY – show you how to define a primary key for a table.
FOREIGN KEY – walk you through the steps of enforcing the relationship between data in
two tables using the foreign key constraint.
NOT NULL – ensure that the values inserted into or updated to a column are not NULL.
CHECK – validate data before it is stored in one or more columns based on a Boolean
expression.