Skip to main contentSkip to solution

Consider the following table 'Emp':

NameSalary
Aaliya120000
Kritika720000
Shabbir540000
Gurpreet228000
Joseph408000
Sanya576000
Vergese180000
Nachaobi348000
Daribha504000
Tanya600000

What will be the output of following query?

SELECT MIN(Salary), MAX(Salary) FROM Emp;

Solution

✅ Correct Option: 2

MIN(Salary) returns the smallest value in the Salary column, which is 120000 (Aaliya). MAX(Salary) returns the largest value, which is 720000 (Kritika). The query therefore returns 120000, 720000.


Option 1: 180000 is only the second smallest salary (Vergese), not the maximum.

Option 4: 600000 (Tanya) is not the largest salary, because 720000 is larger.

MIN and MAX are aggregate functions, so they return one row for the whole table.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question