SQL Joins Mastery
Joins combine rows from two or more tables based on a related column between them.
- INNER JOIN: Selects records that have matching values in both tables.
- LEFT JOIN: Returns all records from the left table, and the matched records from the right table.
Syntax
SELECT a.id, a.name, b.score
FROM users a
INNER JOIN scores b ON a.id = b.user_id;
Your Task
Write a query that selects ools.tool_name, categories.name AS category_name, and ools.views where category enabled = 1.