夢幻之旅

          DEBUG - 天道酬勤

             :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評論 :: 0 Trackbacks
          select
              tu,
              t2.login_name,
              
          case when t1.type is null then null when substr(t1.type,0,1)=1 then '創建任務' else '用戶充值' end type,
              t1.m 
          from
              (
                  
          select 
                      type,
                      
          user_id tu,
                      
          sum(money) m
                  
          from es_consume 
                  
          where 1=1
                  
          group by rollup( type,user_id)
              ) t1,
              es_user t2
          where tu=t2.user_id(+order by t2.user_id-desc;
          posted on 2011-05-04 16:54 HUIKK 閱讀(186) 評論(0)  編輯  收藏 所屬分類: DataBase
          主站蜘蛛池模板: 涪陵区| 宝丰县| 桂阳县| 新竹市| 广南县| 岢岚县| 武宣县| 满洲里市| 色达县| 九龙城区| 富阳市| 临沭县| 武山县| 格尔木市| 嫩江县| 恭城| 新昌县| 呼和浩特市| 万山特区| 阿坝县| 万载县| 新绛县| 屏山县| 长垣县| 西乌珠穆沁旗| 临海市| 东乡族自治县| 黎平县| 五寨县| 分宜县| 买车| 玉环县| 安化县| 西盟| 德庆县| 剑河县| 庆城县| 甘肃省| 柯坪县| 勐海县| 沐川县|