SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Cross Join - All Department-Job Combinations

Build mastery in Joins with this scenario-based SQL challenge and live execution support.

Problem Statement

Generate every possible department × job combination — the Cartesian product. With 5 departments and 6 jobs, the result MUST be exactly 30 rows. Return department_id, department_name, job_id, job_title — ordered by department_id, job_id.

Relevant Tables

departmentsjobs

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: