[ORACLE] [SQL] Anzahl Einträge pro Monat (Zeitstempel)

XChris

Erfahrenes Mitglied
Hallo,

ich habe eine Tabelle mit einem Zeitstempel. Es sind beliebig viele Einträge enthalten. Ich benötige pro Monat die Anzahl der Einträge. Hat jemand einen Hinweis, wie man das Problem in SQL löst?

Tabelle ist in etwas so aufgebaut:
ID | Zeitstempel | Wert A | Wert XY

Beste Grüße,
Chris
 
Selbst gelöst:

SELECT count(id), trunc(r.datum,'MM')
FROM tabelle_x r
GROUP BY trunc(r.datum,'MM')
order by trunc(r.datum,'MM')
 
Zurück