Merge branch 'master' of https://github.com/H4CK3R-01/Datenbanken
This commit is contained in:
commit
c251ba0e83
@ -21,14 +21,15 @@ bezüglich der Gesamtnährwerte dieser Menüs.
|
||||
*/
|
||||
SELECT Menuname,
|
||||
GROUP_CONCAT(Produktname SEPARATOR ', ') AS 'Produkte',
|
||||
SUM(Fett) AS 'Fett',
|
||||
SUM(Kohlenhydrate) AS 'Kohlenhydrate',
|
||||
SUM(Eiweiss) AS 'Eiweiss',
|
||||
SUM(Brennwert) AS 'Brennwert'
|
||||
SUM(Fett * N.Menge / 100) AS 'Fett',
|
||||
SUM(Kohlenhydrate * N.Menge / 100) AS 'Kohlenhydrate',
|
||||
SUM(Eiweiss * N.Menge / 100) AS 'Eiweiss',
|
||||
SUM(Brennwert * N.Menge / 100) AS 'Brennwert'
|
||||
FROM Menu
|
||||
JOIN Menucontent M on Menu.MenuID = M.MenuID
|
||||
JOIN Produkt P on M.ProduktID = P.ProduktID
|
||||
JOIN Naehrwerte N on P.ProduktID = N.ProduktID
|
||||
JOIN Menge M2 on P.ProduktID = M2.ProduktID
|
||||
GROUP BY Menuname;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user