Optimization of SQL query Tuning and Performance

Create tables, insert data and execute and plan times of the queries using Explain and Explain Analyze.
Apply different types of indexes to improve performance.
Apply the hash, merge and nest loop join strategies.