Loading...

Department Spend Difference

A easy SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
easy

Problem

Compute MAX(metric_value) from employee_metrics where department = 'engineering' and MAX(metric_value) where department = 'marketing'. Return a single number: the absolute difference between those two maxima.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.