Employees in FIO format
Tinkoff prepares a contact-center HR report: employees must be output as a single string Last — First — Middle. The HR system also stores an array of corporate aliases per employee (mail logins, zoom, messengers) — not needed in output but present in the schema.
Table employees:
- emp_id INTEGER
- first_nm, middle_nm, last_nm VARCHAR(50) (middle may be NULL)
- birth_dt DATE
- aliases TEXT[] — corporate aliases
- is_active BOOLEAN — active flag
Build a list of active employees with a single fio column in the format Last — First — Middle (long-dash separator) plus their birth date. When middle is NULL it must not appear at all — no double dashes, no trailing separators.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.
| fio | birth_dt |
|---|---|
| Belov — Igor — Aleksandrovich | 1989-06-18 |
| Black — John | 1991-05-21 |
| Green — Alex | 1992-04-04 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in