SQL Mathematical Indicators Scripts