我收到以下语句的主题行中引用的 ORA-00933 错误:
select
(select count(name) as PLIs
from (select
a.name,
avg(b.list_price) as list_price
from
crm.prod_int a, crm.price_list_item b
where
a.row_id = b.product_id
and a.x_sales_code_3 <> '999'
and a.status_cd not like 'EOL%'
and a.status_cd not like 'Not%'
and a.x_sap_material_code is not null
group by a.name)
where list_price = 0)
/
(select count(name) as PLIs
from (select
a.name,
avg(b.list_price) as list_price
from
crm.prod_int a, crm.price_list_item b
where
a.row_id = b.product_id
and a.x_sales_code_3 <> '999'
and a.status_cd not like 'EOL%'
and a.status_cd not like 'Not%'
and a.x_sap_material_code is not null
group by a.name))
as result from dual;
我已经尝试删除别名作为其他帖子中建议的解决方案,但这并没有改变问题。有任何想法吗?谢谢。