By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 6
| status | count | workstation | from | till |
|---|---|---|---|---|
| offline | 2 | 7 | 2020-01-01 | 2020-01-02 |
| idle | 1 | 7 | 2020-01-03 | 2020-01-03 |
| offline | 2 | 7 | 2020-01-04 | 2020-01-05 |
| idle | 1 | 7 | 2020-01-06 | 2020-01-06 |
SELECT 4