SQL Presentation
SQL Presentation
2
Why SQL ?
SQL is used by many companies.
3
Why SQL ?
SQL is used by many companies.
3
Why SQL ?
SQL is in high demand for Data jobs
3
Why SQL ?
SQL is in high demand for Data jobs
3
Why SQL ?
SQL is one of the most popular language for
Data work in 2022
3
SQL Aggregations
SQL aggregation is the task of collecting a set of values to return a single value.
It is done with the help of aggregate functions:
1. COUNT: get how many rows in a column
2. SUM: get the total value of a numeric column
3. MIN and MAX : get the lowers and highest values in a column respectively
4. AVG: get the average of a group of selected values
3
Subqueries
A subquery is a query nested inside another query.
Subqueries can be used in many different locations inside a query:
1. From : to perform operation in multiple stages
2. Where: to use subquery in conditional logic
3. Join : Joining multiple subqueries
4. Union: Union multiple subqueries
3
Common Table Expression (CTE)
WITH name1 AS (
SQL statement for name1
), name2 AS (
SQL statement for name2
)
SQL Statment