create table test( id varchar2(36) not null ,
                             c_jg varchar2(50),
                             c_test sys.xmltype);
alter table test
  add constraint test_PK primary key (ID)xml格式如下:'/root/last_mense'现在执行 :
select count(distinct id ) AS sl,
c_jg
from ( select id,c_jg,sysdate-to_date(extractvalue(c_test,'root/last_mense'),'yyyy-mm-dd') c_last from test ) 
where c_last <10 
group by c_jg;
 
得出的结果:所有的sl都等于1. 好像xml不是怎么支持distinct+group by 。