> select * from (
> select sum(t1_TJ) as t1_项目-数量 from (
> select * from (
> select t1."ID" as t1_ID, t1."TJ" as t1_TJ, xxxxxx from UF_XMXX t1 ) tmp1
> where ( t1_DW = '197' ) ) tmp2 ) tmp3 where 1=1
1.达梦数据库不支持公式别名 带有特殊符号 将 t1_项目-数量 改为 t1_项目数量 即可
2.别名用引号 ‘’