SQL Language (MOSC)

MOSC Banner

Calculating percentage over base value in time series data

in SQL Language (MOSC) 4 commentsAnswered ✓

Hi, I have to calculate % increase of a value-column over base value for each item in a time series data. Example ARTIFACT table data:

I need to calculate % change in value over time for each item on its base value.

For example: for ITEM=10012 I need to calculate % over base VALUE=2345.98 for all years. (different items have different age so base years will vary and also the number of years of item life.)

I tried to lookup any function to calculate like:

SELECT YEAR, ITEM, VALUE/(base VALUE) FROM ARTIFACT WHERE ITEM=11234 ORDER BY YEAR;

however denominator is still not resolved ...

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center