# Top Earning Employees — SQL Interview Question

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/3044/top-earning-employees
Source observed: 2026-11-04T21:34:45.360Z
Last checked: 2026-11-04T21:34:45.36+00:00
Indexed: 2026-11-05T02:48:02.929+00:00

---

# Top Earning Employees

We provide this as an **Easy** SQL coding question in our interview-preparation question library. It asks you to query an `employees` table and return the three highest-earning employees with their IDs, names, and salaries.

## Question

Given the employee database below, write a query to fetch the top three earning employees, including their IDs, names, and salaries.

### `employees` schema

```text
employees
+---------------+---------+
| id            | int     |
| first_name    | varchar |
| last_name     | varchar |
| salary        | int     |
| department_id | int     |
+---------------+---------+
```

Your query must produce results in this format:

```text
id | first_name | last_name | salary
---+------------+-----------+--------
int | varchar   | varchar   | int
```

The page includes an SQL editor with **Editor**, **Share**, **Output**, **Test Results**, and **Console** controls. Running code requires an account: [Sign up to run code](https://www.aced.io/signup?src=lesson).

The detailed solution is locked behind an upgrade: [Upgrade](https://www.aced.io/upgrade?src=questions). No community answers are currently contributed.

## Question details

- Difficulty: Easy
- Category: [Coding](https://www.aced.io/questions?type=coding)
- Topic: [SQL](https://www.aced.io/questions?type=sql)
- Listed roles: [Software Engineer](https://www.aced.io/questions?role=swe), [Data Engineer](https://www.aced.io/questions?role=data-engineer), [Data Scientist](https://www.aced.io/questions?role=data-science), and [Data Analyst](https://www.aced.io/questions?role=data-analyst)
- Listed company: [Google](https://www.aced.io/questions?company=google)
- Interview metadata shown: 5 interviews; last asked 8 months ago

## Interview experience

One shared experience is associated with this question:

- [Google · 8 months ago — Software Engineer · Intern](https://www.aced.io/experiences/google-software-engineer-intern-interview-93a535): “Techs were fair medium LC. Team match is dependent on team. They offer a third technical if one of them went poorly, which was nice.”

This is an interviewee's account of a Google interview and is not a result or performance figure from Aced.

## Related questions

- [Lowest Earning Employees](https://www.aced.io/questions/4375/lowest-earning-employees)
- [Employee Earnings.](https://www.aced.io/questions/3960/employee-earnings)

## Related courses

### [Data Analyst Interview Prep](https://www.aced.io/courses/data-analytics)

![Data Analyst Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/72OTqij57b2TklhaD2vrdV/be0dae6242904970d1696e5a4d858e18/AdobeStock_1357126576.jpeg?w=800&h=800&fm=webp&q=75)

We help candidates prepare for data analyst interviews for product, marketing, and business analyst roles through real take-home case studies, technical and dashboarding practice, and strategies from interviewers at technology companies and startups.

### [Data Science Interview Prep](https://www.aced.io/courses/data-science)

![Data Science Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/3U4C5C0OkDR0UeGch4AmlE/7ad489430b676a088cb973307fe77884/Data_Science_Interview_Prep_Course.jpeg?w=800&h=800&fm=webp&q=75)

We prepare candidates for data science roles at Google, Amazon, Microsoft, Meta, Apple, and other companies with mock interviews, frameworks, and advice from senior candidates. Topics include statistics, experimentation, coding, SQL, machine learning, and behavioral interviews.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F3044%2Ftop-earning-employees&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F3044%2Ftop-earning-employees). Opening a form does not execute a tool.