def _build_analysis_windows_query()

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


    def _build_analysis_windows_query(analysis_windows) -> 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 enrollments 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)"  # noqa:E501
            for aw in analysis_windows
        )