SQL · Point72 · Medium
Convert integer-style date keys into calendar or fiscal quarter labels — the task spans both SQL and Python. Part A — conversion recipe. You are handed an 8-digit integer date key laid out as YYYYMMDD (for instance, 20240331). Produce two artifacts: (a) a SQL expression and (b) a Python function, each of which maps such a key onto a quarter label string of the form 'YYYY-Qn'. Quarters follow the Gregorian calendar — January through March is Q1, April through June is Q2, July…
Checking your access…