Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

6. Main Office Assignment for Each Employee (Easy)
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

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!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible