Professional Documents
Culture Documents
SQL Tutorial: Sampriti Chatterjee (Great Learning)
SQL Tutorial: Sampriti Chatterjee (Great Learning)
Alias concept is used in SQL to give temporary name to the table or the column of the
table
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Joins In SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
What is join in SQL?
A JOIN concept which is basically a clause used to combine rows from different tables
based on a condition
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Types of join in SQL
INNER JOIN
01
Types of join in SQL LEFT JOIN
02
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Types of join in SQL?
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
INNER JOIN
The INNER JOIN helps to select the matching records from the both tables
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for Inner join In SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
LEFT JOIN
The LEFT JOIN helps to fetch all records from the left table and the matching records
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for LEFT join In SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
RIGHT JOIN
The RIGHT JOIN helps to fetch all records from the right table and the matched records
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for RIGHT join In SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
FULL JOIN
The FULL OUTER JOIN helps to fetch all the records from both the table whether there is
a match or not
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for FULL join In SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
SELF JOIN
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for SELF join In SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Group by and Having concept in SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Group By
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for Group by statement
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Having Clause
Having clause has an important role in SQL when we use any aggregate function we can
not use where clause and instead of that we use having clause
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for Having Clause
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Order By
order
order
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for Order by statement
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Subquery in SQL
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
How to handle two or
more queries at a
time?
Do I need to write
two separate query?
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
What is subquery?
Subquery is a SQL command which is nothing but select query that contain another
query inside
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
How many parts are there in a
subquery?
Subquery
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
How subquery executes?
result
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Types of subquery
inner SELECT query and then with the returning values executes
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Demo for Subqueries
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Subquery Vs join
Object oriented
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
History of Python
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Why should you learn Python?
Easy to learn and usable flexibility Huge numbers of Python libraries and
3 4
Frame work
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Installing Python
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Popular IDE for Python: Pycharm
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Popular IDE for Python: Anaconda
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Popular IDE for Python: Google colab
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
SQL with Python
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Thank You
Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.