EASYasked at 3 companies

Average Time of Process per Machine

A easy-tier problem at 69% community acceptance, tagged with Database. Reported in interviews at MindTree and 2 others.

Founder's read

You're staring at a process table with timestamps. MindTree, Infosys, and J.P. Morgan ask this one. The trap is thinking you need complex window functions or subqueries when SQL has a dead simple path forward. 68% pass rate sounds safe until you're live and blank on the grouping strategy. If this hits your assessment and you freeze, StealthCoder surfaces a working solution in seconds, invisible to the proctor. The problem tests whether you can translate "average time per machine" into correct SQL aggregation without overthinking it.

Companies asking
3
Difficulty
EASY
Acceptance
69%

Companies that ask "Average Time of Process per Machine"

If this hits your live OA

Average Time of Process per Machine 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. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop.

Get StealthCoder
What this means

The core trick is GROUP BY on the machine identifier, then AVG() on the duration or time difference. Most candidates either miss the grouping entirely, try to calculate every row's average separately, or overcomplicate with CTEs when a single query does the job. The real gotcha comes when the data structure forces you to calculate the time delta first (end_time minus start_time), then average that result per machine. If you don't read the schema carefully, you'll write aggregations on the wrong column. Since this is a Database topic problem, the interviewer is testing schema literacy and basic aggregate function syntax, not algorithmic prowess. The 68% acceptance rate suggests many people nail it once they see the schema, but live OA pressure makes column names blur together. StealthCoder handles the column references and syntax instantly if you hit that wall.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Average Time of Process per Machine recycles across companies for a reason. It's easy-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. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Average Time of Process per Machine interview FAQ

Is this really an 'easy' problem or is the difficulty inflated?+

The 68% acceptance rate confirms it's genuinely easy. Most failures are syntax errors or misreading the schema, not algorithmic confusion. If you know GROUP BY and AVG(), you can solve this in under 2 minutes once you identify which columns to use.

Do MindTree, Infosys, and J.P. Morgan still ask this in 2024?+

All three companies appear in recent reports asking this problem. Infosys and MindTree especially use it in their technical screens. It's a reliable signal they care about SQL fundamentals, not exotic query patterns.

What's the most common mistake candidates make?+

Forgetting to GROUP BY machine, so they get a single average across all machines. The second mistake is calculating time deltas incorrectly. Read the schema twice before writing the first line of SQL.

Will I need window functions or CTEs for this?+

No. A single SELECT with GROUP BY, AVG(), and maybe a time calculation (if times are separate columns) is the intended solution. Overcomplicated approaches signal you don't trust basic SQL.

How does this problem relate to real database work at these companies?+

It mirrors production reporting: computing metrics per resource (machine, user, server). MindTree and Infosys use similar queries in ETL and analytics pipelines. It's not a trick; it's a baseline skill.

Want the actual problem statement? View "Average Time of Process per Machine" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.