35 of 100 menu

SQL Taskbook Level 4.5

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 calculates the average packaging weight for each category.

Write a query that will group products by manufacturer and calculate the average price for each manufacturer.

Find the total cost of all products in each category and display the result.

Write a query that will group products by manufacturer and find the maximum product rating for each manufacturer.

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