0% found this document useful (0 votes)
5 views

SQL Presentation

The document discusses SQL, which is a programming language used to manage data in relational databases. It covers why SQL is used by companies, in high demand for data jobs, and popular for data work. It also discusses SQL aggregations using aggregate functions, subqueries that are queries nested in other queries, and common table expressions that allow naming and reusing SQL statements.

Uploaded by

ng.huy0708
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

SQL Presentation

The document discusses SQL, which is a programming language used to manage data in relational databases. It covers why SQL is used by companies, in high demand for data jobs, and popular for data work. It also discusses SQL aggregations using aggregate functions, subqueries that are queries nested in other queries, and common table expressions that allow naming and reusing SQL statements.

Uploaded by

ng.huy0708
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

What is SQL ? SQL= Structure Query Language.

This is a programing language that is used


for managing data in a relational database. A relational database is a
collection of data items with pre-defined relationships between them. These
items are organized as a set of tables with columns and rows. SQL is mainly
use for:
Store
Retrieve
Manipulate (Update/ Delete)

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

You might also like