Hi I am using oracle 11g R2. Just wondering if there is a way I can PIVOT date values into columns by having a subquery within the IN clause. This way I can dynamically get the values as columns rather than punching each value in the IN clause.
Thanks for you help!.
Regards
select * from
(select trans_date, amt from sales where trans_date between '01/01/2019' and '01/15/2019')
) pivot
(sum(amt) for trans_date in (--can we use a subquery instead of hardcoding the values)
)