37 of 100 menu

SQL Taskbook Level 4.7

Given a table:

orders
id total_amount order_date ship_date customer_id
1 500.10 2023-10-10 2023-10-12 5
2 321.50 2023-10-15 2023-10-19 5
3 201.15 2023-10-13 2023-10-14 5
4 554.12 2023-10-01 2023-10-03 3
5 321.77 2023-10-15 2023-10-17 2
6 222.11 2023-10-20 2023-10-21 3
7 312.41 2023-10-19 2023-10-21 2
8 290.30 2023-10-15 2023-10-20 3
9 740.10 2023-10-11 2023-10-20 4
10 100.60 2023-10-12 2023-10-21 4

Solve the following tasks for it:

Write a query that groups orders by customer and outputs the total order amount for each customer. The total order amount must be at least 4.

Write a query that groups orders by customer and calculates the average order size for each customer. The average order size must be greater than 300.

Write a query that calculates the average delivery time for each customer. The average delivery time should be no later than '2023-10-17'

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline