Each source is supposed to land once a day. Before anyone trusts a monthly total, they want the days that never arrived.
A source can land twice on one day. A day it missed has no row at all, which is the whole problem.
One row per missing day per source:
sourcemissing_date — 'YYYY-MM-DD'A day is missing when it falls between that source's earliest and latest load and has no row. Report nothing outside that range — before a source's first load it did not exist yet, and after its last there is nothing to say.
| source | missing_date |
|---|---|
| orders | 2024-01-02 |
loads| source | load_date |
|---|---|
| orders | 2024-01-01 |
| orders | 2024-01-03 |
| source | missing_date |
|---|---|
| orders | 2024-01-02 |
loads| source | load_date |
|---|---|
| orders | 2024-01-01 |
| orders | 2024-01-02 |
| orders | 2024-01-03 |
Community-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.