Adding db values and automatic calculation for last table in tab-1.