Tenth-Highest Distinct Salary
Problem statement
Given an employees table, return the tenth-highest distinct salary.
If fewer than ten distinct salaries exist, return no rows. The output contains one column named salary.
Table schema
MySQLPostgreSQLPandas
Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.
employees
| Column | Type | Nullable | Description |
|---|---|---|---|
| employee_idPK | Integer | No | — |
| employee_name | Text | No | — |
| salary | Integer | No | — |
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| salary | Integer | No | — |
Row order: must match exactly. Numeric tolerance: 0.
Constraints
- Employee identifiers are unique.
- Salaries are non-null signed integers.
- Repeated salaries share the same rank.