## 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
import copy
import datetime
from itertools import accumulate
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import pandas as pd
from django.db import connection
from django.db.models import (
    Avg,
    BooleanField,
    Count,
    Exists,
    FloatField,
    Max,
    Min,
    OuterRef,
    Prefetch,
    Q,
    QuerySet,
    Sum,
    Value,
    functions,
)
from django.db.models.expressions import ExpressionWrapper, F, RawSQL, Subquery
from django.db.models.fields import DateTimeField
from django.db.models.functions import Cast
from posthog.constants import TREND_FILTER_TYPE_ACTIONS, TRENDS_CUMULATIVE, TRENDS_LIFECYCLE, TRENDS_PIE, TRENDS_TABLE