wrote .sql script to calculate and populate mva values