## Is your feature request related to a problem?

There's only 2 files where we use pandas, but pandas is 49MB and numpy is another 86MB, slowing down builds massively.

## Describe the solution you'd like

Replace pandas with a pure SQL/Python solution in
- posthog/queries/trends.py
- posthog/queries/sessions.py

Both of those have equivalent examples in Clickhouse (ee/clickhouse) that don't use Pandas.

## Describe alternatives you've considered

Continue using Pandas and clogging builds

## Additional context



#### *Thank you* for your feature request – we love each and every one!

posthog/queries/trends.py
entity_total = 0
    if entity.math == "dau":
        _query, _params = query.query.sql_with_params()
        with connection.cursor() as cursor:
            cursor.execute("SELECT count(DISTINCT person_id) FROM ({}) as aggregates".format(_query), _params)
            entity_total = cursor.fetchall()[0][0]
    elif entity.math in MATH_TO_AGGREGATE_FUNCTION:
        query = query.annotate(
            math_prop=Cast(
                RawSQL('"posthog_event"."properties"->>%s', (entity.math_property,)), output_field=FloatField(),
            )
        )
        query = query.extra(
            where=['jsonb_typeof("posthog_event"."properties"->%s) = \'number\''], params=[entity.math_property],
        )
        _query, _params = query.query.sql_with_params()
        with connection.cursor() as cursor:
            agg_func = MATH_TO_AGGREGATE_STRING[entity.math].format(math_prop="math_prop")
            cursor.execute("SELECT {} FROM ({}) as aggregates".format(agg_func, _query), (_params))
            entity_total = cursor.fetchall()[0][0]
    else:
        entity_total = len(query)
    return entity_total
def get_aggregate_breakdown_total(