Course Content
Introduction: How to Become a Data Analyst
How to Become a Data Analyst
0/1
Installing MySQL and create a database for Windows, MacOS, and Linux
How to Installing MySQL and create a database.
0/1
SELECT Statement and Where Clause in MySQL
Starting your Data Analysis Properly
0/2
LIMIT` + ALIASING` Group by+ Order By, Having Vs Where in MySQL
LIMIT` + ALIASING`
0/3
JOINS
Joins in MySQL
0/1
Unions in MySQL
Unions in MySQL
0/1
Window functions in MySQL
Window functions:- in MySQL
0/1
Common Table Expressions (CTEs) in MySQL and Temp Tables
Common Table Expressions (CTEs) in MySQL
0/2
stored procedures
stored procedures.
0/1
Triggers and Events in MySQL
Triggers and Events
0/1
Data Cleaning in MySQL
Data Cleaning in MySQL
0/1
MSQL EXPLORATORY DATA ANALYSIS
MSQL EXPLORATORY DATA ANALYSIS
0/1
Data Analyst Resume
Data Analyst Resume
0/1
How To Download Your Data Analyst Bootcamp Certification (Congrats!!)
How To Download Your Data Analyst Bootcamp Certification (Congrats!!)
0/1
Guide to Data Analysis for Beginners
About Lesson

In MySQL, “joins” are used to combine rows from two or more tables based on a related column between them. The primary types of joins are: These joins are powerful tools for querying data from multiple tables based on logical relationships

 

  1. INNER JOIN:- Returns rows when there is a match in both tables.

   SELECT columns

   FROM table1

   INNER JOIN table2 ON table1.column_name = table2.column_name;

 

  1. LEFT JOIN (or LEFT OUTER JOIN):- Returns all rows from the left table and the matched rows from the right table. Unmatched rows will have `NULL` values.

   SELECT columns

   FROM table1

   LEFT JOIN table2 ON table1.column_name = table2.column_name;

 

  1. RIGHT JOIN (or RIGHT OUTER JOIN): Returns all rows from the right table and the matched rows from the left table. Unmatched rows will have `NULL` values.

   SELECT columns

   FROM table1

   RIGHT JOIN table2 ON table1.column_name = table2.column_name;

 

  1. FULL JOIN (or FULL OUTER JOIN): Combines the result of both left and right joins. It returns all rows from both tables, with `NULL` for non-matching rows on either side. Note that MySQL does not directly support `FULL OUTER JOIN`, but it can be emulated using `UNION`.

   SELECT columns

   FROM table1

   LEFT JOIN table2 ON table1.column_name = table2.column_name

   UNION

   SELECT columns

   FROM table1

   RIGHT JOIN table2 ON table1.column_name = table2.column_name;

 

  1. CROSS JOIN: Returns the Cartesian product of the rows from the tables, meaning each row from the first table is combined with all rows from the second table

   SELECT columns

   FROM table1

   CROSS JOIN table2;