sql - 总和 >90 天除以总天数
问题描述
第一次发帖,希望一切顺利。我试图总结一些价值观。我试过以下代码。
select t1.ar_date_string,
t1.sum(amount) / (select sum(t1.aMOUNT)
--from V_CUBE_F_PB_TRANSACTION_AGE pba1 where AR_DATE_RANGE='Current AR' )
from t1
where t1.AR range='historical AR' and t1.days out>90
group by t1.ar_date_string, t1.payor
payor ar date string AR range days out amount
walm 9/13/2021 current 80 $100.00
lowes 8/31/2021 historical 100 $100.00
jcp 8/31/2021 historical 120 $50.00
belk 8/31/2021 historical 50 $80.00
我对延迟表示歉意,因为图像等有问题。希望每个付款人每行的百分比。再次感谢大家,
解决方案
推荐阅读
- javascript - Mixed let/const array destructuring from split string
- java - 将 WebMvcConfigurer 添加到 Spring Boot Rest 应用程序时出现内部服务器错误
- swift - SwiftUI:工作表在呈现后立即被解雇
- c++ - Allegro5 无法在 Ubuntu 20.04 上解码 png 图像(使用 cmake)
- javascript - 在 Highcharts 图表顶部绘制幽灵线
- javascript - Javascript将xhr响应字符串转换为数组
- rest - 为查询参数执行 RESTish 对象数组的最佳方法
- jenkins - 在 Jenkins email-ext 插件中,如何为 ${LOG_REGEX} 令牌指定参数(正则表达式和新输出)?
- airflow-scheduler - 有什么方法可以在本地安装 Kubernetes 上的气流
- html - 如何防止表格调整大小?