#98EasyJOINs· Join Types

JOIN Types Mastery

Using tables orders (id, customer_id, product, amount, date) and customers (id, name, city, tier), write queries demonstrating: (1) INNER JOIN: orders with customer names, (2) LEFT JOIN: all customers even without orders, (3) RIGHT JOIN: all orders even without customer match, (4) FULL OUTER JOIN (simulate in MySQL), (5) SELF JOIN: employees and their managers from same table, (6) CROSS JOIN: all possible product-customer combinations.
  • #sql
  • #joins
  • #queries