じ☆vの龍
发表于 2013-4-17 12:17:38
k看看长点见识!
他们都叫我残缺
发表于 2013-4-17 12:18:01
回复看看。。。
sgb6700tt
发表于 2013-4-17 12:28:09
ddddddddddddddddddddddddd
就在这一天
发表于 2013-4-17 13:00:12
支持楼主
qq954320854
发表于 2013-4-17 13:13:40
.........................
blsmsxp
发表于 2013-4-17 13:17:01
kankan~~~~~~~~~
ベ现实︷
发表于 2013-4-17 13:21:08
DDDDDDDDDDDDDDD
xu420830881
发表于 2013-4-17 13:21:50
楼主好人一生平安
bbxz
发表于 2013-4-17 13:22:36
{:soso_e103:}.............
重拾信念者
发表于 2013-4-17 13:36:48
外交官可以做斥候~
stock
发表于 2013-4-17 13:50:13
kankanbucuo
kelvinleung2010
发表于 2013-4-17 13:51:34
不要要挺久的
2276960970
发表于 2013-4-17 14:03:39
select YYYY,RETROFIT_TYPE,SELL_01 as SELL_WITHIN_01,SELL_02 as SELL_WITHIN_02,SELL_03 as SELL_WITHIN_03,SELL_04 as SELL_WITHIN_04,SELL_05 as SELL_WITHIN_05,SELL_06 as SELL_WITHIN_06,SELL_07 as SELL_WITHIN_07,SELL_08 as SELL_WITHIN_08,SELL_09 as SELL_WITHIN_09,SELL_10 as SELL_WITHIN_10,SELL_11 as SELL_WITHIN_11,SELL_12 as SELL_WITHIN_12,AMOUNT as AMOUNTT_WITHIN from(select YYYY,RETROFIT_TYPE,0 as sort, sum(SELL_WITHIN_01) as SELL_01,sum(SELL_WITHIN_02) as SELL_02, sum(SELL_WITHIN_03) as SELL_03,sum(SELL_WITHIN_04) as SELL_04, sum(SELL_WITHIN_05) as SELL_05,sum(SELL_WITHIN_06) as SELL_06, sum(SELL_WITHIN_07) as SELL_07,sum(SELL_WITHIN_08) as SELL_08, sum(SELL_WITHIN_09) as SELL_09,sum(SELL_WITHIN_10) as SELL_10, sum(SELL_WITHIN_11) as SELL_11,sum(SELL_WITHIN_12) as SELL_12, sum(ifnull(SELL_WITHIN_01,0)+ifnull(SELL_WITHIN_02,0)+ifnull(SELL_WITHIN_03,0)+ ifnull(SELL_WITHIN_04,0)+ifnull(SELL_WITHIN_05,0)+ifnull(SELL_WITHIN_06,0)+ifnull(SELL_WITHIN_07,0)+ ifnull(SELL_WITHIN_08,0)+ifnull(SELL_WITHIN_09,0)+ifnull(SELL_WITHIN_10,0)+ifnull(SELL_WITHIN_11,0)+ ifnull(SELL_WITHIN_12,0)) as AMOUNT from scm_rpt_o_0270_vwGroup by YYYY,RETROFIT_TYPEunion select YYYY,RETROFIT_TYPE,1 as sort, sum(SELL_BEYOND_01) as SELL_01,sum(SELL_BEYOND_02) as SELL_02, sum(SELL_BEYOND_03) as SELL_03,sum(SELL_BEYOND_04) as SELL_04, sum(SELL_BEYOND_05) as SELL_05,sum(SELL_BEYOND_06) as SELL_06, sum(SELL_BEYOND_07) as SELL_07,sum(SELL_BEYOND_08) as SELL_08, sum(SELL_BEYOND_09) as SELL_09,sum(SELL_BEYOND_10) as SELL_10, sum(SELL_BEYOND_11) as SELL_11,sum(SELL_BEYOND_12) as SELL_12, ifnull(sum(ifnull(SELL_BEYOND_01,0)+ifnull(SELL_BEYOND_02,0)+ifnull(SELL_BEYOND_03,0)+ ifnull(SELL_BEYOND_04,0)+ifnull(SELL_BEYOND_05,0)+ifnull(SELL_BEYOND_06,0)+ ifnull(SELL_BEYOND_07,0)+ifnull(SELL_BEYOND_08,0)+ifnull(SELL_BEYOND_09,0)+ ifnull(SELL_BEYOND_10,0)+ifnull(SELL_BEYOND_11,0)+ifnull(SELL_BEYOND_12,0)),0) as AMOUNTfrom scm_rpt_o_0270_vwGroup by YYYY,RETROFIT_TYPE union select YYYY,RETROFIT_TYPE,2 as sort,round(100* sum(SELL_WITHIN_01)/(sum(SELL_WITHIN_01)+ifnull(sum(SELL_BEYOND_01),0)),2) as SELL_01,round(100* sum(SELL_WITHIN_02)/(sum(SELL_WITHIN_02)+ifnull(sum(SELL_BEYOND_02),0)),2) as SELL_02,round(100* sum(SELL_WITHIN_03)/(sum(SELL_WITHIN_03)+ifnull(sum(SELL_BEYOND_03),0)),2) as SELL_03,round(100* sum(SELL_WITHIN_04)/(sum(SELL_WITHIN_04)+ifnull(sum(SELL_BEYOND_04),0)),2) as SELL_04,round(100* sum(SELL_WITHIN_05)/(sum(SELL_WITHIN_05)+ifnull(sum(SELL_BEYOND_05),0)),2) as SELL_05,round(100* sum(SELL_WITHIN_06)/(sum(SELL_WITHIN_06)+ifnull(sum(SELL_BEYOND_06),0)),2) as SELL_06,round(100* sum(SELL_WITHIN_07)/(sum(SELL_WITHIN_07)+ifnull(sum(SELL_BEYOND_07),0)),2) as SELL_07,round(100* sum(SELL_WITHIN_08)/(sum(SELL_WITHIN_08)+ifnull(sum(SELL_BEYOND_08),0)),2) as SELL_08,round(100* sum(SELL_WITHIN_09)/(sum(SELL_WITHIN_09)+ifnull(sum(SELL_BEYOND_09),0)),2) as SELL_09,round(100* sum(SELL_WITHIN_10)/(sum(SELL_WITHIN_10)+ifnull(sum(SELL_BEYOND_10),0)),2) as SELL_10,round(100* sum(SELL_WITHIN_11)/(sum(SELL_WITHIN_11)+ifnull(sum(SELL_BEYOND_11),0)),2) as SELL_11,round(100* sum(SELL_WITHIN_12)/(sum(SELL_WITHIN_12)+ifnull(sum(SELL_BEYOND_12),0)),2) as SELL_12,round(100*sum(ifnull(SELL_WITHIN_01,0)+ifnull(SELL_WITHIN_02,0)+ifnull(SELL_WITHIN_03,0)+ ifnull(SELL_WITHIN_04,0)+ifnull(SELL_WITHIN_05,0)+ifnull(SELL_WITHIN_06,0)+ ifnull(SELL_WITHIN_07,0)+ifnull(SELL_WITHIN_08,0)+ifnull(SELL_WITHIN_09,0)+ ifnull(SELL_WITHIN_10,0)+ifnull(SELL_WITHIN_11,0)+ ifnull(SELL_WITHIN_12,0))/ (ifnull(sum(ifnull(SELL_BEYOND_01,0)+ifnull(SELL_BEYOND_02,0)+ifnull(SELL_BEYOND_03,0)+ ifnull(SELL_BEYOND_04,0)+ifnull(SELL_BEYOND_05,0)+ifnull(SELL_BEYOND_06,0)+ ifnull(SELL_BEYOND_07,0)+ifnull(SELL_BEYOND_08,0)+ifnull(SELL_BEYOND_09,0)+ ifnull(SELL_BEYOND_10,0)+ifnull(SELL_BEYOND_11,0)+ifnull(SELL_BEYOND_12,0)),0)+sum(ifnull(SELL_WITHIN_01,0)+ifnull(SELL_WITHIN_02,0)+ifnull(SELL_WITHIN_03,0)+ ifnull(SELL_WITHIN_04,0)+ifnull(SELL_WITHIN_05,0)+ifnull(SELL_WITHIN_06,0)+ ifnull(SELL_WITHIN_07,0)+ifnull(SELL_WITHIN_08,0)+ifnull(SELL_WITHIN_09,0)+ ifnull(SELL_WITHIN_10,0)+ifnull(SELL_WITHIN_11,0)+ ifnull(SELL_WITHIN_12,0))),2) as AMOUNT from scm_rpt_o_0270_vw Group by YYYY,RETROFIT_TYPE) T where1=1 AND YYYY = '2013'order by YYYY,RETROFIT_TYPE,sort limit 0,10000
wang649755396
发表于 2013-4-17 14:07:10
自导自演
gtsoho
发表于 2013-4-17 14:56:11
期待汉之殇的完善 不要要挺久的
563201431
发表于 2013-4-17 15:13:46
路过看啊可能
chaos-1987
发表于 2013-4-17 15:30:40
瞅瞅!!
http://www.1mod.org/forum.php?mod=viewthread&tid=91188&page=1&extra=#pid2504899
绕地飞行
发表于 2013-4-17 15:34:09
{:5_113:}{:5_113:}
西伯^利亚狼
发表于 2013-4-17 15:48:53
很好!很强大!
fthmo1983
发表于 2013-4-17 15:58:24
路过打酱油{:5_144:}
页:
1
[2]
3
4
5
6
7
8
9
10
11