How do I include empty rows in a single GROUP BY DAY(date_field) SQL query?

后端 未结 4 1220
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 12:06

I\'m using MS SQL Server but welcome comparitive solutions from other databases.

This is the basic form of my query. It returns the number of calls per day from the

4条回答
  •  清酒与你
    2021-01-18 13:00

    I would suggest the usage of a date table. With an existing date table in place, you can perform a RIGHT OUTER JOIN to the date table to bring in your missing days.

提交回复
热议问题