Skip to content
Advertisement

Oracle Query to derive all Id’s whose balances have increased from consecutive 3 months along with there growth percent

I wanted to extract all id’s that have increased balances from last consecutive 3 months, and also display their growth percent

sample data set– not all Id’s will have consecutive 3 months of data. In that case derive growth percent from (what is available) most recent previous

Below is the sql i’m using to calculate the metrics, but something seem to be not working right, as my growth_prcnt is wrong. There should be a better way to derive this

Advertisement

Answer

As far as I understood your problem, Following should be the query:

Cheers!!

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement