PostHog HogQL
posthog_hogqlRun an arbitrary HogQL (SQL) query against PostHog data. Use for custom analysis not covered by other tools. Only works if PostHog is connected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return (default: 100) | |
| query | Yes | HogQL query string. HogQL is ClickHouse-compatible SQL; common tables: events, persons, sessions. Example: "SELECT count() FROM events WHERE event = '$pageview' AND timestamp > now() - interval 7 day" | |
| companyId | Yes | FreedomOS company id to act within (you must be a member). Required for company-scoped tools. |