## 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/sessions/sessions.py
sessions = events.filter(_date_gte).annotate(
            previous_timestamp=Window(
                expression=Lag("timestamp", default=None), partition_by=F("distinct_id"), order_by=F("timestamp").asc(),
            )
        )
        sessions_sql, sessions_sql_params = sessions.query.sql_with_params()
        all_sessions = """
            SELECT *,
                SUM(new_session) OVER (ORDER BY distinct_id, timestamp) AS global_session_id
                FROM (
                    SELECT
                        id, team_id, distinct_id, event, elements_hash, timestamp, properties,
                        CASE
                            WHEN EXTRACT('EPOCH' FROM (timestamp - previous_timestamp)) >= (60 * 30) OR previous_timestamp IS NULL
                            THEN 1
                            ELSE 0
                        END AS new_session
                    FROM ({}) AS inner_sessions
                ) AS outer_sessions
        """.format(
            sessions_sql
        )
        return all_sessions, sessions_sql_params
    def _session_avg(self, base_query: Query, params: QueryParams, filter: Filter) -> List[Dict[str, Any]]:
        def _determineInterval(interval):