Consider the following table 'Emp':
Name Salary Aaliya 120000 Kritika 720000 Shabbir 540000 Gurpreet 228000 Joseph 408000 Sanya 576000 Vergese 180000 Nachaobi 348000 Daribha 504000 Tanya 600000
What will be the output of following query?
SELECT MIN(Salary), MAX(Salary) FROM Emp;
Consider the following table 'Emp':
| Name | Salary |
|---|---|
| Aaliya | 120000 |
| Kritika | 720000 |
| Shabbir | 540000 |
| Gurpreet | 228000 |
| Joseph | 408000 |
| Sanya | 576000 |
| Vergese | 180000 |
| Nachaobi | 348000 |
| Daribha | 504000 |
| Tanya | 600000 |
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.
Related questions:
2026: 29 May Shift 2
2025: 16 May Shift 1
2026: 21 May Shift 1
2026: 21 May Shift 1