postgresql - 通过几个条件将某个表连接到 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 在同一张桌子上
解决方案
推荐阅读
- sql - 如何在 SQL 的 WHERE 子句中动态调用列
- perl - 无法通过包定位对象方法
错误 - python - 我如何动态制作列表
- javascript - 长对象的Spring @RequestBody
- python - python中numpy有什么用
- powershell - 如何在powershell中删除不可能删除的空格
- regex - 正则表达式大查询从 url 中提取数字
- javascript - Laravel 和 Vue 应用程序中的 CKEditor5
- javascript - 在 highcharts-react-official 上定义和应用主题
- ios - 为什么使用 viewContext 创建新的 CloudKit 项目会无限刷新视图?