query_segmentation_bucket
Analyze event data distributions by segmenting and filtering numeric properties into specified buckets. Create histograms and assess quantitative metrics over custom ranges for detailed insights.
Instructions
Get data for an event, segmented and filtered by properties, with values placed into numeric buckets. Useful for analyzing distributions of numeric values, creating histograms, and understanding the range of quantitative metrics.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
event | Yes | The event that you wish to get data for. Note: this is a single event name, not an array | |
from_date | Yes | The date in yyyy-mm-dd format to begin querying from (inclusive) | |
on | Yes | The property expression to segment the event on. This expression must be a numeric property | |
project_id | No | The Mixpanel project ID. Optional since it has a default. | |
to_date | Yes | The date in yyyy-mm-dd format to query to (inclusive) | |
type | No | The type of analysis to perform, either general, unique, or average, defaults to general | |
unit | No | The buckets into which the property values that you segment on are placed. Default is 'day' | |
where | Yes | An expression to filter events by based on the grammar: <expression> ::= 'properties["' <property> '"]' | <expression> <binary op> <expression> | <unary op> <expression> | <math op> '(' <expression> ')' | <string literal> <binary op> ::= '+' | '-' | '*' | '/' | '%' | '==' | '!=' | '>' | '>=' | '<' | '<=' | 'in' | 'and' | 'or' | <unary op> ::= '-' | 'not' | |
workspace_id | No | The ID of the workspace if applicable |