This website uses Cookies. Click Accept to agree to our website's cookie use as described in our Privacy Policy. Click Preferences to customize your cookie settings.
‘turnover’ in your window function will refer to the raw column not your derived calculation (like PostgreSQL). You need to use either CTE or sub-SELECT