我正在尝试按月汇总我的每日数据 (trunc(DM_OWNER.LD_LEG_DW.CPLD_DTT)。这是在 Web Intelligence BI 报告中创建的。
SELECT
DM_OWNER.LD_LEG_DW.LGST_GRP_CD,
DM_OWNER.LGST_GRP_T.LGSTGRP_DESC,
DM_OWNER.LD_LEG_DW.CARR_CD,
DM_OWNER.LD_LEG_DW.LD_LEG_ID,
DM_OWNER.LD_LEG_DW.BILL_TO_CUST_CD,
trunc(DM_OWNER.LD_LEG_DW.CPLD_DTT),
trunc(DM_OWNER.VCHR_AP_T.CRTD_DTT),
AP_Detail.PYMNT_AMT_DLR
FROM
DM_OWNER.LD_LEG_DW,
DM_OWNER.LGST_GRP_T,
DM_OWNER.VCHR_AP_T,
DM_OWNER.CHRG_DETL_T_NOTOTAL_V AP_Detail
WHERE
( DM_OWNER.LD_LEG_DW.LD_LEG_ID=DM_OWNER.VCHR_AP_T.LD_LEG_ID(+) )
AND ( DM_OWNER.VCHR_AP_T.VCHR_NUM=AP_Detail.VCHR_NUM_AP )
AND ( DM_OWNER.LD_LEG_DW.LGST_GRP_CD=DM_OWNER.LGST_GRP_T.LGST_GRP_CD )
AND
(
DM_OWNER.LD_LEG_DW.LGST_GRP_CD In ( 'PBRK' )
AND
trunc(DM_OWNER.VCHR_AP_T.CRTD_DTT) >= '01-10-2012 00:00:00'
)