I have 3 tables
district
dist_code dist_name
11 LA
12 WA
demands
dist_name year demandfortheyear
LA 1999 3434.44
dues
dist_name month year currentdue
LA 1 1999 890
LA 2 1999 656
LA 3 1999 455
LA 4 1999 4554
if current year is 1999 and month is 4 I want to retrieve it from system date and get sum of currentdue for previous 3 months(1 to 3)
district
dist_code dist_name
11 LA
12 WA
demands
dist_name year demandfortheyear
LA 1999 3434.44
dues
dist_name month year currentdue
LA 1 1999 890
LA 2 1999 656
LA 3 1999 455
LA 4 1999 4554
if current year is 1999 and month is 4 I want to retrieve it from system date and get sum of currentdue for previous 3 months(1 to 3)