现在查询出来是下图的结果,请教怎么,合并下面 第 1 列 和 第 3 列的时间数据
下面是源码
  select a.time
    dqhlTime,a.count dqhlCount,b.time dsblTime,b.count dsblCount 
    from
    (select to_char(sqsj,'YYYY-MM-DD') time,count(1) count
    from yw_sqxx   
     where  slyy like '2%' and zfzt='1' group by to_char(sqsj,'YYYY-MM-DD')) 
 
    a full join
    
    (select to_char(sqsj,'YYYY-MM-DD') time,count(1) count from yw_sqxx  
    where slyy like '4%' and zfzt='1' group by to_char(sqsj,'YYYY-MM-DD'))  
  
    b on a.time = b.time order by dqhltime desc

解决方案 »

  1.   

    怎么合并呢? nvl(col1,col3) ,这个可以吗?
      

  2.   

    合并 第1 列的时间 和 第 3 列 的时间,让后台可以排序。大神
    @卖水果的net 
      

  3.   

    就是这个效果,
    @卖水果的net 
      

  4.   

       select to_char(sqsj,'YYYY-MM-DD') time,count(1) count
        from yw_sqxx   
         where  slyy like '2%' and zfzt='1' group by to_char(sqsj,'YYYY-MM-DD')
     
       union all
        
        select to_char(sqsj,'YYYY-MM-DD') dsbltime,count(1) dsblcount from yw_sqxx  
        where slyy like '4%' and zfzt='1' group by to_char(sqsj,'YYYY-MM-DD')  
      
       order by dqhltime descunion all 可以实现吗?
      

  5.   

    第 1 列 和 第 三列的数据合并 ,可以相同的时间可以 覆盖
    你是想排序时,按合并后的内容排序吗?order by nvl(col1,col3)