Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Highest Salary and Ranking

EasySQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Highest Salary and Ranking. Start with the requirements and the one table on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Meesho's People Analytics team needs a quick view of the maximum salary currently recorded in its employee dataset. Write a PostgreSQL query that returns the highest salary value from the employees table.

Requirements

  1. Return one row containing the highest non-NULL salary.
  2. Name the result column highest_salary.

Schema

employees
ColumnTypeDescription
employee_idPKINTEGERUnique employee identifier
employee_nameVARCHAR(100)Employee's full name
departmentVARCHAR(50)Employee's department
salaryNUMERIC(12,2)Annual salary in Indian rupees
Tablesemployees
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results