梦幻之旅

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 阅读(175) 评论(0)  编辑  收藏 所属分类: DataBase

只有注册用户登录后才能发表评论。


网站导航: