首页 > 解决方案 > 通过几个条件将某个表连接到 generate_series 日期表

问题描述

我必须根据每日日期线打印某些数据

所以我决定制作一个生成的系列表并将数据加入其中

问题是日期有不同的条件要总结

前任)

2021-05-31  |  count of mod_dts for condition A  | count of reg_dts for condition B
2021-05-30  |  count of mod_dts for condition A  | count of reg_dts for condition B  
2021-05-29  |  count of mod_dts for condition A  | count of reg_dts for condition B 
...

我如何为这种情况制作查询语句

mod_dts, reg_dts 在同一张桌子上

标签: postgresqljoingenerate-series

解决方案


推荐阅读