Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Highest Salary Query
00:00
5 left

Highest Salary Query

EasySQL · PostgreSQL

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
Interviewer

Your question is Highest Salary Query. Start with the requirements and the one table in the Question tab.

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.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.