标签: mysql sql database
我想计算按周分组的行数,如下所示
SELECT count(*) AS count, week(creating_date,1) AS week FROM USERS GROUP BY week(creating_date,1)
但它计算了添加用户的周数。我想获得每周的报告,如果没有添加用户,则应返回0.