## 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
if not filter.date_from:
            return Filter(
                data={
                    **filter._data,
                    "date_from": Event.objects.filter(team_id=team_id)
                    .order_by("timestamp")[0]
                    .timestamp.replace(hour=0, minute=0, second=0, microsecond=0)
                    .isoformat(),
                }
            )
        return filter
    def _format_normal_query(self, entity: Entity, filter: Filter, team_id: int) -> List[Dict[str, Any]]:
        events = process_entity_for_events(entity=entity, team_id=team_id, order_by="-timestamp",)
        items, filtered_events = aggregate_by_interval(events=events, team_id=team_id, entity=entity, filter=filter,)
        formatted_entities: List[Dict[str, Any]] = []
        for _, item in items.items():
            formatted_data = append_data(dates_filled=list(item.items()), interval=filter.interval)
            if filter.display == TRENDS_TABLE or filter.display == TRENDS_PIE:
                formatted_data.update({"aggregated_value": get_aggregate_total(filtered_events, entity)})
            formatted_entities.append(formatted_data)
        return formatted_entities
    def _serialize_breakdown(self, entity: Entity, filter: Filter, team_id: int) -> List[Dict[str, Any]]: