oracle中pivot子查询如何用

在oracle中使用pivot函数,看介绍说在in()中可以使用子查询,但是使用子查询执行时报错缺少表达式,请问子查询应该如何使用,是不是pivot不支持子查询,谢谢

xml 类型的时候可以使用any 关键字和子查询,返回的结果是xml结构的;

select * from (
select times_purchased as "Puchase Frequency", state_code
from customers t
)
pivot xml
(
count(state_code)
for state_code in (select state_code from preferred_states)
)
order by 1
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答