Dependent Variable Math Function In Sql