oracle 按照每周查询统计数据值如果值为0则显示0而不是不显示这一周
select ('第' ||(to_char(create_time,'iw')-15)||'周') as zhou, nvl(count(distinct mname),0) as zongl from stunem t group by to_char(create_time,'iw') order by to_char(create_time,'iw')
你在逗我吗,
select * from (select ('第' ||(to_char(create_time,'iw')-15)||'周') as zhou, nvl(count(distinct mname),0) as zongl from stunem t group by to_char(create_time,'iw') order by to_char(create_time,'iw')) where zongl != 0