JobsJob TrackerJob alerts

Mastek ยท 11 questions

All 11Coding 6Behavioral 2
  • Linked List Manipulation and OperationsCoding
  • Longest Substring Without Repeating CharactersCoding
  • Compute hierarchy level of each employee with SQLCoding
  • Standard HR QuestionsBehavioral
  • Output of C++ code snippets and pointersCoding
  • Truck driver apple toll puzzle
  • Woman born in 1945 being 30 years old today
  • Discuss project not mentioned on resumeBehavioral
  • Doubly Linked List implementation and explanationCoding
  • Doubly Linked List complexity and Tree TraversalsCoding
  • OS, DBMS, and SQL fundamentals
โ† Mastek questions
  1. Interview questions
  2. Mastek
  3. Compute hierarchy level of each employee with SQL
Coding

Compute hierarchy level of each employee with SQL

Filed under Mastek

The question

Given an Employee table with ManagerID, write SQL giving each employee's depth from the root (root is 0).

No write-up yet. Related questions below have one.

Related Mastek questions

  • Linked List Manipulation and Operations
  • Output of C++ code snippets and pointers
  • Doubly Linked List implementation and explanation
  • Doubly Linked List complexity and Tree Traversals
โ† Longest Substring Without Repeating CharactersStandard HR Questions โ†’

Collected from public candidate posts and coding forums. Updated Nov 2026.