FastPrepEmployees Without a Manager
Problems/Employees Without a Manager

Employees Without a Manager

Bank of America logoBank of America● EasyNEW GRADONSITE INTERVIEW

Updated Nov 2025

QuestionConstraints

Problem statement

Source note: Reported by a Bank of America new grad from a 2025 campus drive, in the first live technical round after the video step, as one of two SQL questions. The task was a query that lists the employees who have no manager.

The report gives no table or data. Here, each employee row stores the manager's employee ID in the same table, an employee with no manager has NULL there, and the answer lists those employees' IDs and names. The table and all data are ours.

Our version is about 95% the same as the reported question.

The employees table stores a bank team's reporting lines. Each row is one employee, and manager_id holds the employee_id of the person that employee reports to, who is also a row of the same table. An employee who reports to no one, such as a department head, has NULL in manager_id.

Write a query that lists every employee who has no manager. Return their employee_id and employee_name, in any order.

Table schema

MySQLPostgreSQLPandas

Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.

employees

One row per employee with the ID of their manager.

ColumnTypeNullableDescription
employee_idPKIntegerNoUnique employee ID.
employee_nameTextNoThe employee's name.
manager_idIntegerYesemployee_id of this employee's manager, or NULL if they report to no one.

Foreign key: manager_id → employees(employee_id)

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
employee_idIntegerNo—
employee_nameTextNo—

Row order: any order is accepted. Numeric tolerance: 0.

Constraints

  • The employees table has between 1 and 1000 rows.
  • employee_id values are unique, with 1 <= employee_id <= 100000.
  • employee_name has 1 to 40 characters. Different employees can have the same name.
  • manager_id is NULL or the employee_id of another row of the table.
  • At least one employee has no manager.

More Bank of America Onsite Interview questions

  • Centered Star PyramidONSITE INTERVIEW · Seen Nov 2025
  • Longest Substring Without Repeating CharactersONSITE INTERVIEW · Seen Nov 2025
  • N-th Fibonacci NumberONSITE INTERVIEW · Seen Nov 2025
  • Reverse Each Word in a SentenceONSITE INTERVIEW · Seen Nov 2025
  • Second Highest SalaryONSITE INTERVIEW · Seen Nov 2025
  • Three Numbers That Add Up to a TargetONSITE INTERVIEW · Seen Apr 2025
  • Duplicate RowsONSITE INTERVIEW · Seen Oct 2023
  • Factorial of a NumberONSITE INTERVIEW · Seen Oct 2023
  • Palindrome String CheckONSITE INTERVIEW · Seen Sep 2023
  • Second Largest Element in an ArrayONSITE INTERVIEW · Seen Jun 2023

Similar questions at other companies

  • Delete Duplicate Employee RecordsInfosys · ONSITE INTERVIEWInfosys interview questions
  • Records Created or Updated in a Time WindowPelatro · ONSITE INTERVIEW
  • Top Ten Employee SalariesSolytics Partners · ONSITE INTERVIEW
  • Latest New JobSphere · ONSITE INTERVIEW
  • Employees Whose Manager Left the CompanyZS · ONSITE INTERVIEWZS interview questions
  • Employees Above Average SalaryJP Morgan Chase · ONSITE INTERVIEWJP Morgan Chase interview questions
  • Retrieve Every Student RecordLSEG · ONSITE INTERVIEWLSEG interview questions
  • Combine Winner and Loser NamesAmazon · ONSITE INTERVIEW
  • Conditionally Insert or Update RecordsKlaviyo · ONSITE INTERVIEWKlaviyo interview questions
  • Employees with Matching DepartmentsAMD · ONSITE INTERVIEWAMD interview questions

Bank of America interview experiences

  • Bank of America interviews · December 2025
  • Bank of America OA · December 2025
  • Bank of America interviews · September 2026
  • Bank of America OA · September 2026
All Bank of America interview questionsSee Bank of America hiring insights