Thema: SQL Count

Einzelnen Beitrag anzeigen

Furtbichler
(Gast)

n/a Beiträge
 
#3

AW: SQL Count

  Alt 21. Nov 2012, 08:00
Code:
select *,
  (select count(*) from Tabelle x where x.Feld1=Tabelle.Feld1) as Feld1_Count,
  (select count(*) from Tabelle x where x.Feld2=Tabelle.Feld2) as Feld2_Count,
  (select count(*) from Tabelle x where x.Feld3=Tabelle.Feld3) as Feld3_Count
from Tabelle
  Mit Zitat antworten Zitat