The Upperband is calculated: Middleband + (D + sqrt(((close - Middle band)^2)/n))
And I know how to calculate the lower bollinger band and middle bollinger bands.
But there is an elusive indicator called the bollinger oscillator which I find combines the bollinger bands into a single oscillating indicator. Please explain how to calculate it. Use SQL if possible assume fields contain relevant values.