Hi,
Ich möchte die Ausgabe so haben:
Produkt A 7
Produkt B 3
Produkt C 3
da brauchst Du nicht distinct, sondern group by
SELECT name, SUM(menge) FROM deinetabelle GROUP BY name;
cu,
Andreas
--
Der Optimist: Das Glas ist halbvoll.
Der Pessimist: Das Glas ist halbleer.
Der Ingenieur: Das Glas ist doppelt so groß wie nötig.
Der Optimist: Das Glas ist halbvoll.
Der Pessimist: Das Glas ist halbleer.
Der Ingenieur: Das Glas ist doppelt so groß wie nötig.