Sobes.tech
Middle

Taak #3 We moeten klanten vinden waarvan het verschil tussen hun bestellingen groter is dan 60 dagen. Voor deze klanten, toon de maximale kloof (gap_days). Bestel tabel: | order_id | customer_id | order_dt | |----------|-------------|------------| | 1 | 1 | [phone] | | 2 | 1 | [phone] | | 3 | 1 | [phone] | | 4 | 1 | [phone] | | 5 | 2 | [phone] | | 6 | 2 | [phone] | | 7 | 3 | [phone] | Eindresultaat: | customer_id | gap_days | |-------------|----------| | 1 | 123 | | 2 | 120 |