Thread GROUP BY Timestamp ?: Tag bei Timestamp herausfinden
(30 answers)
Opened by Froschpopo at 2004-08-05 08:00
[sql]SELECT datediff( now(), datums_spalte ) AS days_ago,
count( datediff( now(), datums_spalte ) ) AS count_days, spalte_2 FROM tabelle group by days_ago [/sql] Diese Query zählt die Datensätze eines Tages, aller zurückliegenden Tage. HTH The three chief virtues of a programmer are: Laziness, Impatience and Hubris
[Larry Wall] |