Skip to Main Content

SQL & PL/SQL

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!

Multiple column, single row AVG - is it possible?

607959Mar 3 2008 — edited Mar 4 2008
Hi, I'm having a little problem here.

I have a table that has one column for each month containing values that can be null. I need to get the year's average on a single row on a query level. I have made an extra column that stores the average but I wanted to know if it was possible to do it without adding the column to the table.

Here's an example of what I have

Year Jan Feb Mar .................................................................... Dec
1952 1.2 2.2 3.4 1.7
1953 1.4 2.5 2.7...................................................................... null

I need the AVG on each year... I'm lost right now, any help or information on this topic would be welcomed.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2008
Added on Mar 3 2008
9 comments
5,420 views