1 Page Table - Which SQL Clause To Use To Solve A Question
1 Page Table - Which SQL Clause To Use To Solve A Question
Sub-Query in WHERE clause Inner query’s Output is needed for Filtering Outer Query Table
Sub-Query in FROM clause Inner query’s Output needs to be displayed
Correlated Sub-Query -> Looping Inner Query The inner query is executed once for each row of outer query
It can be in SELECT clause or WHERE clause Can do the work of Window Function
SELF JOIN
SELF JOIN -> One Row JOINED to One Row Self-Referencing Table. Table has Relationship with itself.
Example -> Question related to employee and his manager
SELF JOIN -> One Row JOINED to Many Rows Example -> List of possible couples from Matrimony data table