Seite 1 von 1

Datenbankabfrage

Verfasst: 10.12.2006, 22:16
von Matze1963
Hi!

Habe ein Problem bzw geht folgendes und wenn ja wie ungefähr?:naund:

Möchte aus einem Datenbankfeld werte die grösser als 0 sind und noch die häufigkeit des Wertes. Wenn möglich von gross nach klein sortiert.




Freue mich über Eure Tip!


Cu Matze

Verfasst:
von
SEO Consulting bei ABAKUS Internet Marketing
Erfahrung seit 2002
  • persönliche Betreuung
  • individuelle Beratung
  • kompetente Umsetzung

Jetzt anfragen: 0511 / 300325-0.


Verfasst: 10.12.2006, 22:22
von Ice Man
SELECT count(tabellenfeld) as anzahl from tabelle where tabellenfeld >'0' group by tabellenfeld order by tabellenfeld ASC

Verfasst: 11.12.2006, 01:11
von net(t)worker
Ice Man hat geschrieben:SELECT count(tabellenfeld) as anzahl from tabelle where tabellenfeld >'0' group by tabellenfeld order by tabellenfeld ASC
den Wert dessen Anzahl du zählst, sollteste ggf. auch mit ausgeben lassen...
:wink:

Code: Alles auswählen

SELECT tabellenfeld, count(tabellenfeld) as anzahl from tabelle where tabellenfeld >'0' group by tabellenfeld order by tabellenfeld ASC