-- 嵌套一层试试 select * from( SELECT ID , PROV_ID , PROV_NAME , AREA_ID , AREA_NAME , ORGANISE_ID , ORGANISE_NAME, RIVAL , COMPETITION_RANK, COMPETITION_STATION_NAME, NATURE , DISTANCE , LONGITUDE , DIMENSIONALITY, IPSILATERAL , BRAND, STATION_AREA, -- 油站面积 GUN_AMOUNT , GOODS_NAME , VALUE_ADDED , CREATE_USER, CREATE_TIME, CONCAT(LONGITUDE,',',DIMENSIONALITY) AS 经纬度, UPDATE_USER, UPDATE_TIME, BRAND as '品牌', STATION_AREA as '油站面积', GUN_AMOUNT as '油枪数量' FROM report.APP_BI_FORM_RIVAL_test WHERE CREATE_TIME BETWEEN '${dateEditor0}' AND '${dateEditor1}' ${IF(LEN(comboBox0)=0,"","AND NATURE = '"+comboBox0+"'")} ${IF(LEN(cndProvince)=0,"","AND PROV_ID = '"+cndProvince+"'")} ${IF(LEN(cndRegion)=0,"","AND AREA_ID = '"+cndRegion+"'")} ${IF(LEN(cndStation)=0,"","AND ORGANISE_ID = '"+cndStation+"'")} ) a order by update_time desc
|