Find Longest Calls
A medium-tier problem at 63% community acceptance, tagged with Database. Reported in interviews at IBM and 0 others.
Find Longest Calls is a database problem that shows up in IBM's hiring pipeline and sits at a solid 62.8% acceptance rate, which means it's not a gimmick question but it's not trivial either. You're working with call logs, timing data, and aggregation functions. This one trips up candidates who overthink the schema or miss a GROUP BY clause. If you hit this live and freeze on the SQL structure, StealthCoder reads the problem and surfaces a working query in seconds while the proctor sees nothing.
Companies that ask "Find Longest Calls"
Find Longest Calls is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know.
Get StealthCoderThe core trick here is recognizing what 'longest' really means in your dataset. Most candidates jump straight to MAX() and ORDER BY, which gets them partway there, but they often miss the filtering or grouping logic that actually isolates the right call records. The schema details matter a lot: you need to understand whether you're ranking calls within a caller, across all callers, or finding the single longest call in the entire table. Common miss: forgetting to handle ties or not realizing you need a subquery or window function to avoid accidentally filtering out valid rows. The pattern is standard SQL window functions or GROUP BY with aggregation, but the specific join or WHERE clause trips people up under pressure. That's where the live assessment advantage kicks in. StealthCoder bypasses the schema confusion and gives you the exact query structure that works.
Pattern tags
You know the problem.
Make sure you actually pass it.
Find Longest Calls recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Find Longest Calls interview FAQ
Is Find Longest Calls still being asked at IBM?+
Yes. It's one of the reported problems in IBM's hiring data. At 62.8% acceptance rate, it's a live-assessment filter, not a rare curveball. Expect it if you're in the pipeline there.
What's the most common mistake on this problem?+
Mixing up aggregation levels. Candidates write queries that find the longest call overall but forget to partition by caller, or vice versa. The schema detail you miss in the first 30 seconds usually costs you the solve. Read the exact column names and relationships twice before writing SQL.
Do I need window functions or is GROUP BY enough?+
Depends on what 'longest' means in the problem statement. If you need the longest call per caller, GROUP BY with MAX() is clean. If you need the top N callers or calls ranked, window functions (RANK, ROW_NUMBER) are safer. Check the output format carefully to know which applies.
How does Find Longest Calls relate to other database problems?+
It combines basic aggregation with temporal or categorical grouping, which is common in SQL interview problems. If you can nail GROUP BY, HAVING, and JOIN logic here, you've built a template for almost any 'find the X for each Y' database problem.
If I blank on the exact SQL syntax live, how much time do I lose?+
Blank syntax rarely fails a problem outright, but hesitation eats your 45-60 minutes fast. That's where a quick reference surface solution becomes critical. You confirm the logic, paste the pattern, adjust for their schema, and move forward instead of stuck debugging syntax.
Want the actual problem statement? View "Find Longest Calls" on LeetCode →