Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
6. Main Office Assignment for Each Employee (Easy)
On this page

Problem Statement

Table: OfficeAssignment
This table records the office assignments of employees. Each record includes an employee ID, office ID, and a main office flag indicating whether the office is the employee's main office.

+---------------+----------+
| Column Name   | Type     | 
+---------------+----------+
| employee_id   | int      |
| office_id     | int      |
| main_flag     | varchar  |
+---------------+----------+
(employee_id, office_id) is the primary key for this table.
employee_id is the ID of the employee.

.....

.....

.....

Like the course? Get enrolled and start learning!

On this page