IKH

Types of Joins: A Demonstration

The general syntax of a query using an inner join statement is as follows:

  • select <column_>, column_2>
  • from table_1 a
  • inner join table_2 b
  • on a.<common_column> = b.<common_column>;

Earlier in this session, you learnt about inner joins and writing join queries. You must have noticed that only two tables were referred to in the join. But what if you have a complicated problem statement that needs referencing three, four, five or more tables? In such situations, you can write join queries using multi-joins.

In the next video, Professor Ramanathan will demonstrate this critical concept, which you will be using frequently as a data analyst.

In brief, you can use multi-joins to join multiple tables using common attributes between pairs of tables. This is possible because the result of a join is also a table, which you can join further to another table (with a common attribute).

ERDs can be useful for understanding the links between tables, which, in turn, can be quite helpful in writing multi-way join queries.

Let’s have some demonstration of outer join in the next segment.

Report an error