17,377
社区成员
发帖
与我相关
我的任务
分享
select chi_name, hope_qty, prd_qty, nvlprd_qty, 0) - nvl(hope_qty, 0) differ, case when nvl(hope_qty, 0) = 0 then null else round(nvl(prd_qty, 0) / nvl(hope_qty, 0), 3) * 100 || '%' end reach, case when nvl(present, 0) = 0 then null when print_e is not null then to_char(round(nvl(prd_qty, 0) / nvl(present, 0)), '990.0') else to_char(round(nvl(prd_qty, 0) / nvl(present, 0), 1), '990.0') end avgs
from work
where work.engineer = '剪切'
and work.prod_date between to_date('2015/08/20', 'yyyy/mm/dd') and
to_date('2015/08/20', 'yyyy/mm/dd')
and work.company_no = 'OK1';