夢幻之旅

          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 閱讀(183) 評論(0)  編輯  收藏 所屬分類: DataBase
          主站蜘蛛池模板: 大同市| 灵宝市| 嘉兴市| 新宁县| 灯塔市| 永嘉县| 清丰县| 荣成市| 徐汇区| 武义县| 宁武县| 同心县| 东乡县| 甘南县| 镇巴县| 永吉县| 凤翔县| 和龙市| 乌兰察布市| 宁海县| 金堂县| 巨鹿县| 蛟河市| 涿鹿县| 建德市| 美姑县| 泸水县| 麟游县| 紫阳县| 额尔古纳市| 大悟县| 白玉县| 普宁市| 随州市| 盐城市| 中牟县| 阜城县| 鹤庆县| 宜春市| 长汀县| 通河县|