SELECT PROJECT_NAME AS 项目, IF(LEN(PROJECT)==0,PROJECT_TYPE,YEAR_MONTHS) AS 分类, NET_PROFIT_ACT AS 动态版净利润, NET_PROFIT_TAR AS 方案版净利润, NET_PROFIT_DEVIATION AS 净利润偏差, NET_INTEREST_RATE_ACT AS 动态版净利率, NET_INTEREST_RATE_TAR AS 方案版净利率, NET_INTEREST_RATE_DEVIATION AS 净利率偏差, CARGO_VALUE_ACT AS 动态版货值, CARGO_VALUE_TAR AS 方案版货值, CARGO_VALUE_DEVIATION AS 货值偏差, CARGO_COST_ACT AS 动态版成本, CARGO_COST_TAR AS 方案版成本, CARGO_COST_DEVIATION AS 成本偏差 FROM IF(LEN(PROJECT)==0,DW_LR_FINANCE_INDEX_BY_PRO,DW_LR_FINANCE_INDEX_BY_PRO_MONTH) WHERE IF(AND(LEN(PROJECT)==0,TYPE!='全部项目') ,PROJECT_TYPE = '${TYPE}',PROJECT_NAME = '${PROJECT}') IF(AND(LEN(PROJECT)==0,TYPE='全部项目') ,,PROJECT_NAME = '${PROJECT}') |