39 of 100 menu

SQL Taskbook Level 4.9

Given a table:

products
id name category_id manufacturer_id price weight rating
1 product-1 1 2 100 1.5 5
2 product-2 2 3 200 1.7 4.3
3 product-3 2 3 150 0.8 2.2
4 product-4 3 3 500 0.9 3.3
5 product-5 3 2 750 1.0 4.9
6 product-6 1 5 800 0.5 3.9
7 product-7 1 5 900 10 4.0
8 product-8 1 2 175 12 3.5
9 product-9 2 1 245 5 4.2
10 product-10 1 2 260 4 4.1

Solve the following tasks for it:

Write a query that groups products into categories and returns the average price for each category. The average price for a product must be at least 350.

Write a query that groups products into categories and calculates the average rating of products in each category. The average rating should be at least 4.1.

Find the total amount of orders for each product supplier. The total amount of orders for suppliers must be greater than 3.

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