I am a bit stuck on one problem for a few hours now.
Let`s say I have a table with the following data:
month outstanding
01/05/2012 35 678 956
02/05/2012 33 678 956
03/05/2012 31 678 956
04/05/2012 27 678 956
05/05/2012 24 678 956
i need to get the ratio of say, day 05/05/2012 results to the first day of that month E.G. Outstanding of05/05/2012 divided by outstanding 01/05/2012 (24 678 956/35 678 956)
What function should i use? Tried doing over partition by / by result of to_char(trunc(trunc(a.date_,'MM'), 'MM'),'DD-MM-YYYY')
Didnt seem to work for me