def _build_analysis_windows_query()

in src/mozanalysis/sizing.py [0:0]


    def _build_analysis_windows_query(analysis_windows: tuple[AnalysisWindow]) -> str:
        """Return SQL to construct a table of analysis windows.

        To query a time series, we construct a table of analysis windows
        and cross join it with the targets table to get one row per
        pair of client and analysis window.

        This method writes the SQL to define the analysis window table.
        """
        return "\n        UNION ALL\n        ".join(
            f"""(SELECT {aw.start} AS analysis_window_start,
                {aw.end} AS analysis_window_end)"""
            for aw in analysis_windows
        )