Skip to main content
SQL โ€ข LESSON 95

Subquery with MIN

How can we find employees earning the minimum salary?

Advancedโฑ 3 Minutesโญ 1080 XP
๐Ÿค” THE QUESTION

How can we find employees earning the minimum salary?

๐Ÿ’ก WHAT IS IT?

Subqueries with MIN() identify rows matching the lowest boundary value dynamically.

๐ŸŽฏ WHAT IS IT USED FOR?

Base-tier employee audits, minimum price lookups, earliest event detection.

๐Ÿ’ป EXAMPLE
SELECT name, salary
FROM employees
WHERE salary = (
    SELECT MIN(salary)
    FROM employees
);

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for Subquery with MIN.

  • โœ“ Subquery with MIN
  • โœ“ Baseline record detection
  • โœ“ Lowest boundary query
  • โœ“ Nested filtering