SQL For Data Science
SQL For Data Science
com
7OPHDBMN8E
SQL Tutorial
Alias concept is used in SQL to give temporary name to the table or the column of the
table
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
Joins In SQL
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
What is join in SQL?
A JOIN concept which is basically a clause used to combine rows from different tables
based on a condition
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
Types of join in SQL
INNER JOIN
01
Types of join in SQL LEFT JOIN
02
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
Types of join in SQL?
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
INNER JOIN
The INNER JOIN helps to select the matching records from the both tables
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
The LEFT JOIN helps to fetch all records from the left table and the matching records
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
The RIGHT JOIN helps to fetch all records from the right table and the matched records
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
The FULL OUTER JOIN helps to fetch all the records from both the table whether there is
a match or not
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
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
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
order
shivamprajapati1734@gmail.com
By default order
7OPHDBMN8E by sorts the data into ascending
order
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
Subquery in SQL
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
How to handle two or
more queries at a
time?
Do I need to write
two separate query?
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
What is subquery?
Subquery is a SQL command which is nothing but select query that contain another
query inside
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
How many parts are there in a
subquery?
Subquery
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
How subquery executes?
shivamprajapati1734@gmail.com
7OPHDBMN8E
result
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
Types of subquery
inner SELECT query and then with the returning values executes
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
shivamprajapati1734@gmail.com
7OPHDBMN8E
High level Interpreted
Object oriented
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
History of Python
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
Why should you learn Python?
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
Installing Python
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
Popular IDE for Python: Pycharm
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
isProprietary
meant for Learning. Alluse
personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only. prohibited
content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution
Sharing or publishing the contents in part or full is liable for legal action.
Popular IDE for Python: Anaconda
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.
Popular IDE for Python: Google colab
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
isProprietary
meant for Learning. Alluse
personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only. prohibited
content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution
Sharing or publishing the contents in part or full is liable for legal action.
shivamprajapati1734@gmail.com
7OPHDBMN8E
Proprietary
This file content. © Great
is meant Learning. Alluse
for personal Rights
byReserved. Unauthorized use or distribution prohibited.
shivamprajapati1734@gmail.com only.
Sharing or publishing the contents in part or full is liable for legal action.