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.
A simpler way to handle day of quarter in Redshift that avoids the CASE
statement is:
DATEDIFF('day',date_trunc('quarter',${created_time}),${created_time}) +
1