## Bug description

When calculating Trends results with an aggregated (e.g. single output, like big number) display type, WAU/MAU don't work. This is because we have an `ACTIVE_USERS_SQL` query for time series display types, but we don't have a version of this for aggregated display types. (See ZEN-1043.)

## How to reproduce

1. Create an insight with a single WAU or MAU series.
2. Switch display type to "Number".
3. Open the "Debug ClickHouse queries" modal from the command palette.
4. See `COUNT(*)` instead of `COUNT(DISTINCT person_id)`.

#### *Thank you* for your bug report – we love squashing them!

posthog/queries/trends/sql.py
) d
    /* In Postgres we'd be able to do a non-cross join with multiple inequalities (in this case, <= along with >),
       but this is not possible in ClickHouse as of 2022.10 (ASOF JOIN isn't fit for this either). */
    CROSS JOIN (
        SELECT
            toTimeZone(toDateTime(timestamp, 'UTC'), %(timezone)s) AS timestamp,
            {aggregator}
        FROM ({event_query}) events
        WHERE 1 = 1 {parsed_date_from_prev_range} {parsed_date_to}
        GROUP BY timestamp, {aggregator}
    ) e WHERE e.timestamp <= d.timestamp + INTERVAL 1 DAY AND e.timestamp > d.timestamp - INTERVAL {prev_interval}
    GROUP BY d.timestamp
    ORDER BY d.timestamp
) WHERE 1 = 1 {parsed_date_from} {parsed_date_to}
"""
AGGREGATE_SQL = """
SELECT groupArray(day_start) as date, groupArray({aggregate}) as data FROM (
    SELECT {smoothing_operation} AS count, day_start
    from (
        {null_sql}
        UNION ALL
        {content_sql}
    )
    group by day_start
    order by day_start
)
SETTINGS timeout_before_checking_execution_speed = 60
"""
CUMULATIVE_SQL = """
SELECT person_id, min(timestamp) as timestamp