夢幻之旅

          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
          主站蜘蛛池模板: 高雄县| 敦化市| 莱西市| 绥化市| 南陵县| 禄丰县| 兰西县| 南乐县| 邵阳县| 陇川县| 岳池县| 英吉沙县| 博湖县| 皮山县| 贵州省| 惠东县| 东明县| 南安市| 紫云| 延川县| 宁都县| 永年县| 赤水市| 镶黄旗| 自治县| 饶河县| 双流县| 赤城县| 武陟县| 定西市| 阳谷县| 河津市| 云梦县| 万源市| 宁蒗| 湘西| 搜索| 科技| 东乌珠穆沁旗| 保山市| 六枝特区|