#655

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.

fiobirth_dt
Belov — Igor — Aleksandrovich1989-06-18
Black — John1991-05-21
Green — Alex1992-04-04
Tinkoff

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid