# Second maximum salary by department — Aced

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/6291/find-second-maximum-salary-department
Source observed: 2026-11-04T23:34:51.831Z
Last checked: 2026-11-04T23:34:51.831+00:00
Indexed: 2026-11-07T02:37:25.193+00:00

---

# Second maximum salary by department

We publish this interview-practice question for data-engineering candidates. The task is to find the second-highest salary in each department when employee, department, and salary data is stored in a dictionary.

- **Role:** [Data Engineer](https://www.aced.io/questions?role=data-engineer)
- **Company:** [Meta](https://www.aced.io/questions?company=meta-facebook)
- **Categories:** [Data Structures & Algorithms](https://www.aced.io/questions?type=algorithms), [Coding](https://www.aced.io/questions?type=coding)
- **Interview experience:** 1 shared experience
- **Reported last asked:** 7 months ago

## Access and answering

Detailed company statistics for this question require [Upgrade](https://www.aced.io/upgrade?src=questions). To submit an answer, log in or sign up; submitting marks the question complete.

## Interview experience

[Meta · 7 months ago](https://www.aced.io/experiences/meta-facebook-senior-data-engineer-interview-f71127)

> I interviewed for Meta IC5 Senior Data Engineer, and the process felt hard but achievable if you prepare the right way. The first big hurdle was a live 1-hour CoderPad screening with 3 SQL and 3 Python questions, and the hardest part by far was the time pressure. After that, the onsite was four rounds and felt much more analytical than other DE or backend loops I've done, especially around SQL, data modeling, and tradeoff thinking. The round that stood out most was designing an Uber-style data model and then defending scaling choices like bucketing and hash-based partitioning once the table size went past 1 TB. Overall, it felt very SQL-heavy and very focused on whether I could show real technical depth, not just solve toy problems.
>
> **Data Engineer · Senior / L5**

## Community answers

No answers have been contributed by the community yet.

## Related question

- [Write a query to find the top 3 unique salaries in each department and list all employees who have those salaries.](https://www.aced.io/questions/5087/sql-top-three-salaries-per-department)

## Related courses

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

![Data Engineering Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/5XoOCgXlGqN2fa1zaroNWd/9a2e23df48a212bc00d352873feb2d6a/Data_Engineer_Interview_Prep_Hero_Image.jpg?w=800&h=800&fm=webp&q=75)

Land your dream data engineering role at Meta, Google, Amazon, Microsoft, Walmart, DoorDash, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice data modeling, pipeline design, SQL, coding, behavioral interviews, and more.

### [Behavioral Interviews: A Practical Guide for Engineers](https://www.aced.io/courses/eng-behavioral)

![Behavioral Interviews: A Practical Guide for Engineers](https://images.ctfassets.net/x78yjrjc11pq/47qcoHjzFZXE37GoacedkB/9d8e3f4910d8b06b21e76745cd9cbff3/AdobeStock_1142146335.jpeg?w=800&h=800&fm=webp&q=75)

Get offers at the level you deserve. Prep for senior+ behavioral interviews at FAANG and Tier-1 companies. Made with staff and principal engineers from Meta, Netflix, Google, and more. Avoid downleveling, elevate past projects, and stop sounding like a robot.

## Explore Aced

We are Aced, formerly Exponent. We provide interview preparation through courses, questions, interview experiences, practice, and coaching.

- [All questions](https://www.aced.io/questions)
- [Data Engineering course](https://www.aced.io/courses/data-engineering)
- [Courses](https://www.aced.io/courses?src=nav)
- [Loops](https://www.aced.io/guides?src=nav)
- [Experiences](https://www.aced.io/experiences?src=nav)
- [Practice](https://www.aced.io/practice?src=nav)
- [Coaching](https://www.aced.io/coaching?src=nav)
- [Pricing](https://www.aced.io/upgrade?src=nav)
- [Log in](https://www.aced.io/login?src=nav)
- [Sign up](https://www.aced.io/signup?src=nav)

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F6291%2Ffind-second-maximum-salary-department&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%2F6291%2Ffind-second-maximum-salary-department). Opening a form does not execute a tool.