Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Highest Salary Query

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

Your question is Highest Salary Query. 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

Persistent Systems needs a quick salary summary for its engineering workforce. Write a PostgreSQL query that returns the highest non-null salary recorded in the employees table.

Requirements

  1. Return exactly one row containing the maximum value in salary.
  2. Name the result column highest_salary.
  3. Do not return employee details or calculate an average or total.

Schema

employees
ColumnTypeDescription
employee_idPKINTUnique employee identifier
nameVARCHAR(100)Employee's full name
salaryNUMERIC(10,2)Annual employee salary
Tablesemployees
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results