MySQL count and group by day

后端 未结 4 1272
误落风尘
误落风尘 2020-12-11 16:51

I have the following structure

ID    DATE(DATETIME)         TID
1     2012-04-01 23:23:23    8882

I\'m trying to count the amount of rows a

4条回答
  •  时光说笑
    2020-12-11 17:34

    You can group using the DAY function:

    SELECT DAY(Date), COUNT(*)
    FROM table
    WHERE TID = 8882
    GROUP BY DAY(Date)
    

提交回复
热议问题