Calculating percentage over base value in time series data
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 ...