QuickBytes is a series of articles for simple and easy to implement techniques with exponential benefits

In the previous article and video, we have seen how we can use the Merge Queries feature to join two different tables. This QuickBytes article covers how we can use Merge Queries for doing self-join. We perform self-join where we need inputs from the same table.
Consider the following example:

Objective: Add a column for Manager ID
Step 1: Merge Queries
Select the same table in Merge Query:

Step 2: Expand the table
Expand table and select ID

Output
