我有以下查询生成“组函数的无效使用”错误:
SELECT dac_name, unit_name, ptn, unit_type, monthly_recurring, directory_charges
FROM sprint WHERE date='$current_sprint_date' AND CAST( directory_charges AS DECIMAL( 10, 2 ) ) > SUM( CAST( directory_charges AS DECIMAL( 10, 2 ) ) * .01) ORDER BY CAST(directory_charges AS DECIMAL(10,2)) DESC LIMIT 10;
似乎无法弄清楚。任何帮助是极大的赞赏。