query = (
            sa.select(
                [
                    *tables.traffic_profiles.c,
                    tables.internal_balancers.c.vip_id,
                    db_functions.json_build_object(
                        db_functions.s("id"),
                        tables.traffic_profiles.c.backend_group_id,
                        db_functions.s("ssl"),
                        tables.backend_groups.c.ssl,
                        db_functions.s("balancing_method"),
                        tables.backend_groups.c.balancing_method,
                        db_functions.s("keepalive_timeout"),
                        tables.backend_groups.c.keepalive_timeout,
                    ).label("backend_group"),
                    db_functions.json_agg_from(
                        tables.backend_group_backends.c.backend_id.label("id"),
                        tables.backends.c.enabled.label("powered_on"),
                        *tables.backend_group_backends.get_cols(
                            "weight", "max_fails", "standby", "backup", "enabled"
                        ),
                        order=True,
                    ).label("backends"),
                    db_functions.json_from(
                        tables.traffic_profiles.c.sni_type.label("type"),
                        tables.traffic_profiles.c.sni_value.label("value"),
                    ).label("sni_options"),
                ]
            )
            .group_by(
                *tables.traffic_profiles.c,
                tables.internal_balancers.c.vip_id,
                tables.backend_groups.c.balancing_method,
                tables.backend_groups.c.keepalive_timeout,
                tables.backend_groups.c.ssl,
            )
            .select_from(
                tables.traffic_profiles.outerjoin(
                    tables.backend_groups,
                    tables.backend_groups.c.id
                    == tables.traffic_profiles.c.backend_group_id,
                )
                .outerjoin(
                    tables.backend_group_backends,
                    tables.backend_group_backends.c.backend_group_id
                    == tables.traffic_profiles.c.backend_group_id,
                )
                .outerjoin(
                    tables.backends,
                    tables.backends.c.id == tables.backend_group_backends.c.backend_id,
                )
                .join(
                    tables.internal_balancers,
                    tables.internal_balancers.c.id == tables.traffic_profiles.c.id,
               The letter d should appear at least 36 times.
user