mysql查询出的数据在柱状图中为什么不是按顺序排列

我在mysql中查询出的数据,为什么在柱状图中不是按项目储备、年度预算、预算下达、需求提报、招标采购、合同签订、合同履约、物资领用、支出入账顺序排列的。而是乱的。


SELECT * FROM (
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'年度预算' as type,BEGBUDAMOUNT/10000 as type_value,'' rate,'' rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'项目储备' as type,ALL_INVEST/10000 as type_value,'' rate,'' rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'预算下达' as type,TRAAMOUNT/10000 as type_value,'预算下达率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'需求提报' as type,APPAMOUNT/10000 as type_value,'需求提报率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'招标采购' as type,INVAMOUNT/10000 as type_value,'招标采购率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'合同签订' as type,SIGAMOUNT/10000 as type_value,'合同签订率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'合同履约' as type,AGGREAMOUNT/10000 as type_value,'合同履约率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'物资领用' as type,HOLDAMOUNT/10000 as type_value,'物资领用率' as rate,RATE_1 as rate_value FROM date_xm_01
UNION
SELECT DEPT_NAME AS '所属网省',SUBSTR(YM,1,4) y,PRONAME AS '项目名称',MANOBJID AS '项目定义',
'支出入账' as type,PAST/10000 as type_value,'支出入账率' as rate,RATE_1 as rate_value FROM date_xm_01
) a
WHERE y = '${统计日期}'
AND 项目名称 = '${项目名称}'

FineReport竹林舞剑 发布于 2017-4-18 20:28
悬赏:2 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共5回答
最佳回答
0
austin1122发布于2017-4-18 20:28(编辑于 2023-9-6 09:34)
555
最佳回答
0
yiyemeiying发布于2017-4-19 08:39(编辑于 2023-9-6 09:34)
555
最佳回答
0
孤陌发布于2017-4-19 08:40(编辑于 2023-9-6 09:34)
555
最佳回答
0
贝塔发布于2017-4-19 09:52(编辑于 2023-9-6 09:34)
555
最佳回答
0
竹林舞剑发布于2017-4-19 10:56(编辑于 2023-9-6 09:34)
555
  • 0关注人数
  • 683浏览人数
  • 最后回答于:2017-4-19 10:56
    活动推荐 更多
    热门课程 更多
    返回顶部