S
Seoffix.com
Sign In Get Pro Membership
SQL Intermediate
Estimated Duration: 20 min

SQL: Multi-Table INNER and LEFT JOINs

Learn how relational databases connect records across disparate tables using INNER JOIN and LEFT JOIN operations.

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

sql
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.
Target Output
5 rows returned with columns: tool_name, category_name, views
Need a Hint?
  • Aliases like t and c keep queries concise
  • JOIN on foreign key relationship
  • Filter with WHERE on the category status
solution.js
Terminal Output Ready
Click "Run Code & Test" to execute your solution.