HogQL query examples and reference material for PostHog data. Read when writing SQL queries to find patterns for analytics (trends, funnels, retention, lifecycle, paths, stickiness, web analytics, error tracking, logs, sessions, LLM traces) and system data (insights, dashboards, cohorts, feature flags, experiments, surveys, hog flows, data warehouse). Includes HogQL syntax differences, system model schemas, and available functions.
If the MCP server haven't provided instructions on querying data in PostHog, read the guidelines.
Schema reference for PostHog's core system models, organized by domain:
$survey_dismissed/{id}, $feature/{key} that don't appear in tool resultsUse the examples below to create optimized analytical queries.