我正在尝试计算= (Accounts Payable/YTD_Vendor_Expenses)*Number of days in Period
天后的应付帐款。
我正在尝试以下查询,但似乎不起作用(我正在ZOHO Analytics中运行查询):
SELECT groupkey,
`Total Accounts Payable`,
Report_Month,
`Total Income`,
month(`Report_Month`) * 30 as `Number of Days in Period`,
YTD(sum(`Vendor Expenses`),`Report_Month`) as `YTD_Vendor Expenses`,
(sum(`Total Accounts Payable`) / YTD(sum("Vendor Expenses"),"Report_Month") * (month(`Report_Month`) * 30)
FROM apd_table
GROUP BY `groupkey`,
`Report_Month`,
`Total Accounts Payable`,
`Total Income`
请帮助我。谢谢。