Hallo,
ich habe ein Problem mit dem Summieren von Tabelleneinträgen. Ich habe eine Tabelle, wie z.B.
Anzahl Art
1 Apfel
1 Birne
2 Apfel
und möchte jetzt die Anzahl der Äpfel, also 3, ... ermitteln.
Die Abfrage:
SELECT Art, count( Art ) AS C FROM tabelle GROUP BY Art
funktioniert schon mal ganz gut allerdings wird die Anzahl nicht miteinbezogen.
SELECT Art, count( Art * Anzahl ) AS C FROM tabelle GROUP BY Art
funktioniert nicht.
Wer kann mir helfen?
Gruss
martin