Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Percentage Calculations

TinaMar 21 2024

Hi Experts,

I need one help on percentage calculation in below query/data set, while displaying all columns

I am trying to calculate percentage on 'AVG' for each row. Could you please help?

SELECT
DATE_FILTER,
CHECK_TYPE,
STATE AS "State",
'Gross Amount' LABLE,
SUM(V.GRS_CAP_COST_AMT)/COUNT(*) AS AVG,
COUNT(*) AS "No of accounts"
FROM VW_PBI_EV_PORTFOLIO V
WHERE DATE_FILTER = 'Last Week'
GROUP BY
STATE ,
CHECK_TYPE,
DATE_FILTER
ORDER BY LABLE, DATE_FILTER, CHECK_TYPE, STATE

Thanks and Regards !!

This post has been answered by Solomon Yakobson on Mar 21 2024
Jump to Answer
Comments
Post Details
Added on Mar 21 2024
2 comments
340 views