By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| Id | Manufacturer | Model | Size | hoursWhenBought | purchaseDate |
|---|---|---|---|---|---|
| 2 | Dudek | Synthesis LT | 31.0 | 45 | 2017-11-04 |
| 3 | Dudek | Universal 1.1 | 28.0 | 0 | 2019-08-23 |
| 8 | Dudek | Nucleon XX | 24.0 | 150 | 2021-01-02 |
| 13 | Dudek | Hadron 3 | 20.0 | 3 | 2022-10-16 |
| Id | Date | TakeOffTime | LandingTime | WingId |
|---|---|---|---|---|
| 1 | 2019-09-02 | 10:00:00.0000000 | 12:00:00.0000000 | 3 |
| 2 | 2019-09-03 | 09:30:00.0000000 | 12:30:00.0000000 | 3 |
| 3 | 2020-05-05 | 07:00:00.0000000 | 08:45:00.0000000 | 3 |
| 4 | 2020-09-28 | 13:00:00.0000000 | 15:00:00.0000000 | 3 |
| 5 | 2021-01-03 | 17:00:00.0000000 | 19:00:00.0000000 | 8 |
| 6 | 2021-01-05 | 15:30:00.0000000 | 17:00:00.0000000 | 8 |
| 7 | 2021-08-25 | 06:00:00.0000000 | 08:00:00.0000000 | 8 |
| 8 | 2021-08-26 | 07:00:00.0000000 | 09:30:00.0000000 | 3 |
| 9 | 2021-09-01 | 06:00:00.0000000 | 07:00:00.0000000 | 8 |
| 10 | 2022-08-10 | 07:00:00.0000000 | 09:00:00.0000000 | 8 |
| 11 | 2022-10-17 | 15:00:00.0000000 | 17:00:00.0000000 | 13 |
| 12 | 2022-10-19 | 16:00:00.0000000 | 18:00:00.0000000 | 8 |
| 13 | 2022-12-21 | 13:00:00.0000000 | 15:30:00.0000000 | 13 |
| wingId | date | servicedBy | comments |
|---|---|---|---|
| 3 | 2020-09-21 | Joe Blogs | full trim service |
| 8 | 2021-08-24 | Joe Blogs | full trim service |
| 8 | 2022-08-03 | Joe Blogs | full trim service |
| WingId | EventType | eventDate | TOff | LT | wHours | cicleN | cumHours | cumService | totHours | id |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | purchase | 2017-11-04 | null | null | 45.000000 | 1 | 45.000000 | 45.000000 | 0.000000 | 0 |
| 3 | purchase | 2019-08-23 | null | null | 0.000000 | 1 | 0.000000 | 0.000000 | 0.000000 | 0 |
| 3 | flight | 2019-09-02 | 10:00:00.0000000 | 12:00:00.0000000 | 2.000000 | 1 | 2.000000 | 2.000000 | 2.000000 | 1 |
| 3 | flight | 2019-09-03 | 09:30:00.0000000 | 12:30:00.0000000 | 3.000000 | 1 | 5.000000 | 5.000000 | 5.000000 | 2 |
| 3 | flight | 2020-05-05 | 07:00:00.0000000 | 08:45:00.0000000 | 1.750000 | 1 | 6.750000 | 6.750000 | 6.750000 | 3 |
| 3 | Service | 2020-09-21 | null | null | 0.000000 | 2 | 6.750000 | 0.000000 | 6.750000 | 0 |
| 3 | flight | 2020-09-28 | 13:00:00.0000000 | 15:00:00.0000000 | 2.000000 | 2 | 8.750000 | 2.000000 | 8.750000 | 4 |
| 3 | flight | 2021-08-26 | 07:00:00.0000000 | 09:30:00.0000000 | 2.500000 | 2 | 11.250000 | 4.500000 | 16.750000 | 8 |
| 8 | purchase | 2021-01-02 | null | null | 150.000000 | 1 | 150.000000 | 150.000000 | 8.750000 | 0 |
| 8 | flight | 2021-01-03 | 17:00:00.0000000 | 19:00:00.0000000 | 2.000000 | 1 | 152.000000 | 152.000000 | 10.750000 | 5 |
| 8 | flight | 2021-01-05 | 15:30:00.0000000 | 17:00:00.0000000 | 1.500000 | 1 | 153.500000 | 153.500000 | 12.250000 | 6 |
| 8 | Service | 2021-08-24 | null | null | 0.000000 | 2 | 153.500000 | 0.000000 | 12.250000 | 0 |
| 8 | flight | 2021-08-25 | 06:00:00.0000000 | 08:00:00.0000000 | 2.000000 | 2 | 155.500000 | 2.000000 | 14.250000 | 7 |
| 8 | flight | 2021-09-01 | 06:00:00.0000000 | 07:00:00.0000000 | 1.000000 | 2 | 156.500000 | 3.000000 | 17.750000 | 9 |
| 8 | Service | 2022-08-03 | null | null | 0.000000 | 3 | 156.500000 | 0.000000 | 17.750000 | 0 |
| 8 | flight | 2022-08-10 | 07:00:00.0000000 | 09:00:00.0000000 | 2.000000 | 3 | 158.500000 | 2.000000 | 19.750000 | 10 |
| 8 | flight | 2022-10-19 | 16:00:00.0000000 | 18:00:00.0000000 | 2.000000 | 3 | 160.500000 | 4.000000 | 23.750000 | 12 |
| 13 | purchase | 2022-10-16 | null | null | 3.000000 | 1 | 3.000000 | 3.000000 | 19.750000 | 0 |
| 13 | flight | 2022-10-17 | 15:00:00.0000000 | 17:00:00.0000000 | 2.000000 | 1 | 5.000000 | 5.000000 | 21.750000 | 11 |
| 13 | flight | 2022-12-21 | 13:00:00.0000000 | 15:30:00.0000000 | 2.500000 | 1 | 7.500000 | 7.500000 | 26.250000 | 13 |
| Id | Date | Duration | CumulativeHours |
|---|---|---|---|
| 1 | 2019-09-02 | 02:00:00.0000000 | 2.0 |
| 2 | 2019-09-03 | 03:00:00.0000000 | 5.0 |
| 3 | 2020-05-05 | 01:45:00.0000000 | 6.8 |
| 4 | 2020-09-28 | 02:00:00.0000000 | 8.8 |
| 5 | 2021-01-03 | 02:00:00.0000000 | 10.8 |
| 6 | 2021-01-05 | 01:30:00.0000000 | 12.3 |
| 7 | 2021-08-25 | 02:00:00.0000000 | 14.3 |
| 8 | 2021-08-26 | 02:30:00.0000000 | 16.8 |
| 9 | 2021-09-01 | 01:00:00.0000000 | 17.8 |
| 10 | 2022-08-10 | 02:00:00.0000000 | 19.8 |
| 11 | 2022-10-17 | 02:00:00.0000000 | 21.8 |
| 12 | 2022-10-19 | 02:00:00.0000000 | 23.8 |
| 13 | 2022-12-21 | 02:30:00.0000000 | 26.3 |
| Id | Date | TakeOffTime | LandingTime | WingID | Duration | CumulativeHours | CumulativeHoursSinceService |
|---|---|---|---|---|---|---|---|
| 1 | 2019-09-02 | 10:00:00.0000000 | 12:00:00.0000000 | 3 | 02:00:00.0000000 | 2.00 | 2.00 |
| 2 | 2019-09-03 | 09:30:00.0000000 | 12:30:00.0000000 | 3 | 03:00:00.0000000 | 5.00 | 5.00 |
| 3 | 2020-05-05 | 07:00:00.0000000 | 08:45:00.0000000 | 3 | 01:45:00.0000000 | 6.75 | 6.75 |
| 4 | 2020-09-28 | 13:00:00.0000000 | 15:00:00.0000000 | 3 | 02:00:00.0000000 | 8.75 | 2.00 |
| 8 | 2021-08-26 | 07:00:00.0000000 | 09:30:00.0000000 | 3 | 02:30:00.0000000 | 16.75 | 4.50 |
| 5 | 2021-01-03 | 17:00:00.0000000 | 19:00:00.0000000 | 8 | 02:00:00.0000000 | 10.75 | 152.00 |
| 6 | 2021-01-05 | 15:30:00.0000000 | 17:00:00.0000000 | 8 | 01:30:00.0000000 | 12.25 | 153.50 |
| 7 | 2021-08-25 | 06:00:00.0000000 | 08:00:00.0000000 | 8 | 02:00:00.0000000 | 14.25 | 2.00 |
| 9 | 2021-09-01 | 06:00:00.0000000 | 07:00:00.0000000 | 8 | 01:00:00.0000000 | 17.75 | 3.00 |
| 10 | 2022-08-10 | 07:00:00.0000000 | 09:00:00.0000000 | 8 | 02:00:00.0000000 | 19.75 | 5.00 |
| 12 | 2022-10-19 | 16:00:00.0000000 | 18:00:00.0000000 | 8 | 02:00:00.0000000 | 23.75 | 7.00 |
| 11 | 2022-10-17 | 15:00:00.0000000 | 17:00:00.0000000 | 13 | 02:00:00.0000000 | 21.75 | 5.00 |
| 13 | 2022-12-21 | 13:00:00.0000000 | 15:30:00.0000000 | 13 | 02:30:00.0000000 | 26.25 | 7.50 |