Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Highest Paid Role at Amazon
00:00
5 left

Highest Paid Role at Amazon

MediumSQL · PostgreSQL

Problem

Given a dataset containing a list of worker’s names, their positions, and salaries at Amazon, select the highest-paid Software Engineer at the company.

Asked in the technical screen, this query-writing task uses the employees and positions tables. Ignore workers whose salary is NULL. If multiple eligible workers share the highest salary, return the alphabetically first employee.

Output

  1. Return one row with employee_name, position_title, and salary.
  2. Include only the selected Software Engineer with the highest non-NULL salary.
  3. Order the result by employee_name ascending.

Schema

employees
ColumnTypeDescription
employee_idPKINTUnique employee identifier
employee_nameVARCHAR(100)Employee's full name
position_idINTIdentifier of the employee's position
salaryNUMERIC(12,2)Annual salary in US dollars
positions
ColumnTypeDescription
position_idPKINTUnique position identifier
position_titleVARCHAR(100)Position title
Tablesemployeespositions
Interviewer

Your question is Highest Paid Role at Amazon. Start with the requirements and the two tables 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
Sign up free to run your codeLog inLn 1
Run your query to see results here.