合并句子

select count(1),
        HANDLEUNIT
        from slj_info
        where
        handleunit not in(0167,0004)
        and createtime between '${kssj} 00:00:00' and '${jssj} 23:59:59'
        group by handleunit
       
        select
handleunit,count(*)
from slj_info
        where handleunit not in(0167,0004)
        and HANDLEPJ=2
        and createtime between '${kssj} 00:00:00' and '${jssj} 23:59:59'
group by handleunit


select
        handleunit,count(*)
        from slj_info
        where handleunit not in(0167,0004)
        and zzt=5
        and createtime between '${kssj} 00:00:00' and '${jssj} 23:59:59'
        group by handleunit



怎么写成一句
FineReport回音无痕 发布于 2018-5-21 18:33
悬赏:2 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共9回答
最佳回答
0
flyingsnake发布于2018-5-21 18:33(编辑于 2023-9-6 09:34)
555
  • 回音无痕 回音无痕(提问者) 不行,只有一行
    回复
    2018-05-21 18:55 
  • 回音无痕 回音无痕(提问者) 回复 回音无痕 :不对用都不能用
    回复
    2018-05-21 18:57 
  • 回音无痕 回音无痕(提问者) select handleunit,count(1) jb,
    sum( case when handlepj=2 then 1 else 0 end) my,
    sum( case when  and zzt=5 then 1 else 0 end) bj
    from slj_info
    where handleunit not in(0167,0004)
    and createtime between \'${kssj} 00:00:00\' and \'${jssj} 23:59:59\'
    group by handleunit试了下,报错缺失表达式,没看出啥问题,大神指点下
    回复
    2018-05-21 19:07 
  • 回音无痕 回音无痕(提问者) 式子没写好,找到了
    回复
    2018-05-21 19:09 
  • flyingsnake flyingsnake 回复 回音无痕 :嗯.搞定了就是好同志.哈
    回复
    2018-05-21 21:09 
最佳回答
0
回音无痕发布于2018-5-21 18:55(编辑于 2023-9-6 09:34)
555
最佳回答
0
回音无痕发布于2018-5-21 19:11(编辑于 2023-9-6 09:34)
555
最佳回答
0
flyingsnake发布于2018-5-21 21:09(编辑于 2023-9-6 09:34)
555
  • 0关注人数
  • 418浏览人数
  • 最后回答于:2018-5-21 21:09
    活动推荐 更多
    热门课程 更多
    返回顶部