## 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/util.py
date_from = filter.date_from
    date_to = filter.date_to
    delta = timedelta(seconds=seconds_in_interval)
    time_range: List[str] = []
    if not date_from or not date_to:
        return time_range
    while date_from <= date_to:
        time_range.append(date_from.strftime("%Y-%m-%d{}".format(" %H:%M:%S" if filter.interval == "hour" else "")))
        date_from += delta
    return time_range
def ensure_value_is_json_serializable(value: Any) -> Optional[float]:
    """Protect against the undesirable cases of a value being NaN or Infinity, and track occurences of those.
    This function returns a null as fallback, so that JSON (de)serialization doesn't trip over the NaN."""
    if not isinstance(value, (float, int)) or isnan(value) or isinf(value):
        exception = Exception("Non-serializable value found in insight result")
        logger.error("queries.trends.non_serializable_value", exc=exception, exc_info=True)
        with push_scope() as scope:
            scope.set_tag("value", value)
            capture_exception(exception)
        return None
    return value