select ((normalcost*25*0.5)+(schoolcost*25)) as "projectedcost"
from ( select count(orderno) as normalcost
from platterorder
where to_char(deliveryDate,'MON-YYYY')='APR-2013'
),
( select count(orderno) as schoolcost
from schoolorder
where to_char(deliveryDate,'MON-YYYY')='APR-2013'
);
上面的代码运行良好,但是当我尝试添加 discountpercent 列代替 0.5 时,它显示错误
相关表格如下
PlatterOrder
( orderNo,
deliveryDate,
deliveryTime,
invoiced,
isBulk,
platterQuantity,
discountPercent,
clientNo
)
SchoolOrder
( orderNo,
deliveryDate,
deliveryTime,
invoiced,
taxExPercent,
clientNo
);