Added Aufgabe 5

This commit is contained in:
Leon Amtmann 2022-05-17 18:22:47 +02:00
parent 9fe61a1afa
commit 72c6d56cd1

View File

@ -66,10 +66,17 @@ ORDER BY LENGTH(GROUP_CONCAT(E_Nummer)) - LENGTH(REPLACE(GROUP_CONCAT(E_Nummer),
/* /*
---------------------------------- 5 ---------------------------------- ---------------------------------- 5 ----------------------------------
Sortieren Sie alle enthaltenen Produkte aufsteigend nach Kalorienanzahl in der Portion, die verkauft wird. Sortieren Sie alle [in der Datenbank (anm. d. St.)] enthaltenen Produkte aufsteigend nach Kalorienanzahl in der Portion, die verkauft wird.
----------------------------------------------------------------------- -----------------------------------------------------------------------
*/ */
SELECT Produktname,
ROUND(Brennwert * (M.Menge / 100), 1) AS Brennwert,
M.Menge,
M.Einheit
FROM Produkt
JOIN Naehrwerte N on Produkt.ProduktID = N.ProduktID
JOIN Menge M on Produkt.ProduktID = M.ProduktID
ORDER BY Brennwert;
/* /*
---------------------------------- 6 ---------------------------------- ---------------------------------- 6 ----------------------------------