why the below query take too much time.
Dear all ,
I design a query for Item Cost Aging Report in EBS R12 , but it take too much time , when i run this query for item it showing correct result and when i run this query for specific category the it take too much extra time . Anyone can help me what is missing join .
select category , sum(CVal) total_cost ,
SUM(CASE WHEN days >=0 AND days<=30 THEN CVal ELSE 0 END) DAYS_30,
SUM(CASE WHEN days >=31 AND days<=90 THEN CVal ELSE 0 END) DAYS_90,
SUM(CASE WHEN days >=91 AND days<=180 THEN CVal ELSE 0 END) DAYS_180,
SUM(CASE WHEN days >=181 AND days<=360 THEN CVal ELSE 0 END) DAYS_360,