FastPrepTenth-Highest Distinct Salary
Problems/Tenth-Highest Distinct Salary

Tenth-Highest Distinct Salary

Infosys logoInfosys● MediumFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionConstraints

Problem statement

Source note: Reported in an Infosys full-time onsite interview. The reported exercise asks for the tenth-highest salary, and talks about the offset approach and the dense-ranking approach. We chose these things so the answer is always the same: rank distinct salaries, return an empty result when there are fewer than ten values, and name the output column. Our version is about 93% the same as the reported question.

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

ColumnTypeNullableDescription
employee_idPKIntegerNo—
employee_nameTextNo—
salaryIntegerNo—

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
salaryIntegerNo—

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.

More Infosys Onsite Interview questions

  • Minimum Coins for a TargetONSITE INTERVIEW · Seen Nov 2026
  • Delete Duplicate Employee RecordsONSITE INTERVIEW · Seen Nov 2026
  • Find Duplicate Employee RecordsONSITE INTERVIEW · Seen Nov 2026
  • Minimum Insertion Steps to Make a String PalindromeONSITE INTERVIEW · Seen Nov 2026
  • Maximize the Even-Odd Index Product GapONSITE INTERVIEW · Seen Oct 2026
  • Minimum Nonadjacent Flips for an Alternating Binary StringONSITE INTERVIEW · Seen Oct 2026
  • Assign Cookies With Matching ParityONSITE INTERVIEW · Seen Sep 2026
  • Count Equal Code Pairs Within Distance KONSITE INTERVIEW · Seen Sep 2026
  • Daily Successful Transactions Per DepartmentONSITE INTERVIEW · Seen Sep 2026
  • Detect Substring In Any RotationONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Daily USD Totals with Effective-Dated Exchange RatesMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Most Recent Order for Each CustomerCapgemini · ONSITE INTERVIEWCapgemini interview questions
  • Fifth Highest Salary In A DepartmentZS · ONSITE INTERVIEWZS interview questions
  • In-Memory Database QueriesOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Order Book Data ValidationJane Street · ONSITE INTERVIEWJane Street interview questions
  • Nth-Highest Distinct Salary Without Ranking FunctionsMastercard · ONSITE INTERVIEWMastercard interview questions
  • Contest Participants with Long Totals and Short QuestionsThe Walt Disney Company · ONSITE INTERVIEWThe Walt Disney Company interview questions
  • First Order per Merchant per DateAmazon · ONSITE INTERVIEW
  • Block Transaction Count TrendsChainalysis · ONSITE INTERVIEWChainalysis interview questions
  • Third-Highest Distinct SalaryExpedia · ONSITE INTERVIEWExpedia interview questions
All Infosys interview questionsSee Infosys hiring insights