• oracle


     drop table test;
    create table test(a varchar2(30),b varchar2(30),c varchar2(30));
    insert into test values('aaa','1','a');
    insert into test values('bbb','2','a');
    insert into test values('ccc','5','a');
    insert into test values('ddd','3','a');
    insert into test values('aaaaa','11','b');
    insert into test values('bbbbb','22','b');
    insert into test values('ccccc','55','b');
    insert into test values('ddddd','33','b');

    select * from test
    select c,max(a),max(b) from (
    select c,wm_concat(a) over (partition by c order by a) a,
             wm_concat(b)  over (partition by c order by a) b from test
    ) tt
    group by c ; 

  • 相关阅读:
    BZOJ 1088 模拟(扫雷经验…)
    BZOJ 1529
    BZOJ 3224
    BZOJ 1192
    BZOJ 1012
    博客搬家说明
    BZOJ 2423 DP
    BZOJ 1789&1830 推式子 乱搞
    BZOJ 1588
    拆点:虫洞
  • 原文地址:https://www.cnblogs.com/yinxingyeye/p/4995287.html
Copyright © 2020-2023  润新知