The fields for querying a Metric in leaderboard format.A Metric’s leaderboard query returns an ordered table of Dimension and Metric values over a given time range.
MetricInput
The Metric to query. You can query a pre-configured Metric by ID or name, or you can query an ad hoc Metric that you define inline.
Show MetricInput
ID
The ID of a pre-configured Metric.
String
The name of a pre-configured Metric.
CustomMetricQueryInput
An ad hoc Custom Metric.
Show CustomMetricQueryInput
DataPoolInput
required
The Data Pool to which this Metric belongs.
Show DataPoolInput
ID
The ID of the Data Pool.
String
The name of the Data Pool.
String
required
Custom expression for defining the Metric.
CountMetricQueryInput
An ad hoc Count Metric.
Show CountMetricQueryInput
DataPoolInput
required
The Data Pool to which this Metric belongs.
Show DataPoolInput
ID
The ID of the Data Pool.
String
The name of the Data Pool.
SumMetricQueryInput
An ad hoc Sum Metric.
Show SumMetricQueryInput
DataPoolInput
required
The Data Pool to which this Metric belongs.
Show DataPoolInput
ID
The ID of the Data Pool.
String
The name of the Data Pool.
DimensionInput
required
The column to be summed.
Show DimensionInput
The fields for creating or modifying a Dimension.
String
required
The name of the column to create the Dimension from.
AverageMetricQueryInput
An ad hoc Average Metric.
Show AverageMetricQueryInput
DataPoolInput
required
The Data Pool to which this Metric belongs.
Show DataPoolInput
ID
The ID of the Data Pool.
String
The name of the Data Pool.
DimensionInput
required
The column to be averaged.
Show DimensionInput
The fields for creating or modifying a Dimension.
String
required
The name of the column to create the Dimension from.
MinMetricQueryInput
An ad hoc Min Metric.
Show MinMetricQueryInput
DataPoolInput
required
The Data Pool to which this Metric belongs.
Show DataPoolInput
ID
The ID of the Data Pool.
String
The name of the Data Pool.
DimensionInput
required
The column to calculate the minimum from.
Show DimensionInput
The fields for creating or modifying a Dimension.
String
required
The name of the column to create the Dimension from.
MaxMetricQueryInput
An ad hoc Max Metric.
Show MaxMetricQueryInput
DataPoolInput
required
The Data Pool to which this Metric belongs.
Show DataPoolInput
ID
The ID of the Data Pool.
String
The name of the Data Pool.
DimensionInput
required
The column to calculate the maximum from.
Show DimensionInput
The fields for creating or modifying a Dimension.
String
required
The name of the column to create the Dimension from.
CountDistinctMetricQueryInput
An ad hoc Count Distinct Metric.
Show CountDistinctMetricQueryInput
DataPoolInput
required
The Data Pool to which this Metric belongs.
Show DataPoolInput
ID
The ID of the Data Pool.
String
The name of the Data Pool.
DimensionInput
required
The column to count distinct values from.
Show DimensionInput
The fields for creating or modifying a Dimension.
String
required
The name of the column to create the Dimension from.
TimeRangeInput
The time range for calculating the leaderboard.
Show TimeRangeInput
The fields required to specify the time range for a time series, counter, or leaderboard Metric query.If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.If both relative and absolute time ranges are provided, the relative time range will take precedence.If a LAST_N relative time period is selected, an n ≥ 1 must be provided. If no n is provided or n < 1, a BAD_REQUEST error will be returned.
String
The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any.
Set this to filter on an alternative timestamp field.
RelativeTimeRange
The relative time period.
Show RelativeTimeRange
The Relative time ranges are based on the current date and time.THIS - The current unit of time. For example, if today is June 8, 2022, and
THIS_MONTH is selected, then data for June 2022 would be returned.PREVIOUS - The previous unit of time. For example, if today is June 8, 2022, and
PREVIOUS_MONTH is selected, then data for May 2022 would be returned. It excludes
the current unit of time.NEXT - The next unit of time. For example, if today is June 8, 2022, and
NEXT_MONTH is selected, then data for July 2022 would be returned. It excludes
the current unit of time.LAST_N - The last n units of time, including the current one. For example, if today
is June 8, 2022 and LAST_N_YEARS with n = 3 is selected, then data for 2020, 2021, and
2022 will be returned. It will include the current time period.
THIS_HOUR: Starts at the zeroth minute of the current hour and continues for 60 minutes.
TODAY: Starts at 12:00:00 AM of the current day and continues for 24 hours.
THIS_WEEK: Starts on Monday, 12:00:00 AM of the current week and continues for seven days.
THIS_MONTH: Starts at 12:00:00 AM on the first day of the current month and continues for the duration of the month.
THIS_QUARTER: Starts at 12:00:00 AM on the first day of the current calendar quarter and continues for the duration of the quarter.
THIS_YEAR: Starts on January 1st, 12:00:00 AM of the current year and continues for the duration of the year.
PREVIOUS_HOUR: Starts at the zeroth minute of the previous hour and continues for 60 minutes.
YESTERDAY: Starts at 12:00:00 AM on the day before the today and continues for 24 hours.
PREVIOUS_WEEK: Starts on Monday, 12:00:00 AM, a week before the current week, and continues for seven days.
PREVIOUS_MONTH: Starts at 12:00:00 AM on the first day of the month before the current month and continues for the duration of the month.
PREVIOUS_QUARTER: Starts at 12:00:00 AM on the first day of the calendar quarter before the current quarter and continues for the duration of the quarter.
PREVIOUS_YEAR: Starts on January 1st, 12:00:00 AM, the year before the current year, and continues for the duration of the year.
NEXT_HOUR: Starts at the zeroth minute of the next hour and continues for 60 minutes.
TOMORROW: ” Starts at 12:00:00 AM, the day after the current day, and continues for 24 hours.
NEXT_WEEK: Starts on Monday, 12:00:00 AM, the week after the current week, and continues for the duration of the week.
NEXT_MONTH: Starts at 12:00:00 AM on the first day of the next month and continues for the duration of the month.
NEXT_QUARTER: Starts at 12:00:00 AM on the first day of the next calendar quarter and continues for the duration of the quarter.
NEXT_YEAR: Starts on January 1st, 12:00:00 AM of the next year and continues for the duration of the year.
LAST_N_MINUTES: Starts at the zeroth second n - 1 minute(s) before the current minute and continues through the current minute. It includes this minute.
LAST_N_HOURS: Starts at the zeroth minute of the n - 1 hour(s) before the current hour, and continues through the current hour. It includes this hour.
LAST_N_DAYS: Starts at 12:00:00 AM, n - 1 day(s) before the current day, and continues through the current day. It includes today.
LAST_N_WEEKS: Starts on Monday, 12:00:00 AM, n - 1 week(s) before the current week, and continues through the current week. It includes this week.
LAST_N_MONTHS: Starts at 12:00:00 AM on the first day of the month, n - 1 month(s) before the current month, and continues through the current month. It includes this month.
LAST_N_QUARTERS: Starts at 12:00:00 AM on the first day of the calendar quarter n - 1 quarter(s) before the current quarter and continues through the current quarter. It includes this quarter.
LAST_N_YEARS: Starts on January 1st, 12:00:00 AM of the year n - 1 year(s) before the current year and continues through the current year. It includes this year.
LAST_15_MINUTES
LAST_30_MINUTES
LAST_HOUR
LAST_4_HOURS
LAST_12_HOURS
LAST_24_HOURS
LAST_7_DAYS
LAST_30_DAYS
LAST_90_DAYS
LAST_3_MONTHS
LAST_6_MONTHS
LAST_YEAR
LAST_2_YEARS
LAST_5_YEARS
Int
The number of time units for the LAST_N relative periods.
DateTime
The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
DateTime
The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
String
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
[DimensionInput!]
required
One or many Dimensions to group the Metric values by. Typically, Dimensions in a leaderboard are what you want to compare and rank.
Show DimensionInput
The fields for creating or modifying a Dimension.
String
required
The name of the column to create the Dimension from.
Sort
The sort order of the rows. It can be ascending (ASC) or descending (DESC) order. Defaults to descending (DESC) order when not provided.
Show Sort
The available sort orders.
ASC: Sort in ascending order.
DESC: Sort in descending order.
Int
required
The number of rows to be returned. It can be a number between 1 and 1,000.
String
The Query Filters to apply before retrieving the leaderboard data, in the form of SQL. If no Query Filters are provided, all data is included.
Show Deprecated Fields
ID
deprecated
The ID of the Metric to query.Required if metricName is not specified.deprecated: Use metric
String
deprecated
The name of the Metric to query.Required if metricId is not specified.deprecated: Use metric
[FilterInput!]
deprecated
The Query Filters to apply before retrieving the leaderboard data. If no Query Filters are provided, all data is included.deprecated: Use filterSql instead
Show FilterInput
The fields of a filter.You can construct more complex filters using and and or. For example, to construct a filter equivalent to
(value > 0 AND value <= 100) OR status = "confirmed"
The operation to perform when comparing the column and filter values.
Show FilterOperator
The available Filter operators.
EQUALS: Selects values that are equal to the specified value.
NOT_EQUALS: Selects values that are not equal to the specified value.
GREATER_THAN: Selects values that are greater than the specified value.
GREATER_THAN_OR_EQUAL_TO: Selects values that are greater or equal to the specified value.
LESS_THAN: Selects values that are less than the specified value.
LESS_THAN_OR_EQUAL_TO: Selects values that are less or equal to the specified value.
IS_NULL: Selects values that are null. This operator does not accept a value.
IS_NOT_NULL: Selects values that are not null. This operator does not accept a value.
LIKE: Selects values that match the specified pattern.
NOT_LIKE: “Selects values that do not match the specified pattern.
String
The value to compare the column to.
[FilterInput!]
Additional filters to AND with this one. AND takes precedence over OR.
[FilterInput!]
Additional filters to OR with this one. AND takes precedence over OR.
Response
The leaderboard response object. It contains an array of headers and a table (array of rows) with the selected Dimensions and corresponding Metric values for the given time range and Query Filters.
[String!]
required
The table headers. It contains the Dimension and Metric names.
[[String]!]
required
An ordered array of rows. Each row contains the Dimension values and the corresponding Metric value. A Dimension value can be empty. A Metric value will never be empty.
QueryInfo
required
The Query statistics and metadata.
Show QueryInfo
The Query Info object. It contains metadata and statistics about a Query performed.
ID
required
The Query’s unique identifier.
DateTime
required
The date and time in UTC when the Query was created.
String
required
The unique identifier of the actor that performed the Query.
DateTime
required
The date and time in UTC when the Query was last modified.
String
required
The unique identifier of the actor that modified the Query.
String
required
The bytes processed by the Query.
Int
required
The duration of the Query in milliseconds.
String
required
The number of records processed by the Query.
Int
required
The bytes returned by the Query.
Int
required
The number of records returned by the Query.
Propeller
The Propeller used for this query.
Show Propeller
A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.
P1_X_SMALL: Max records per second: 5,000,000 records per second
P1_SMALL: Max records per second: 25,000,000 records per second
P1_MEDIUM: Max records per second: 100,000,000 records per second
P1_LARGE: Max records per second: 250,000,000 records per second
P1_X_LARGE: Max records per second: 500,000,000 records per second
QueryStatus
required
The Query status.
Show QueryStatus
The Query status.
COMPLETED: The Query was completed succesfully.
ERROR: The Query experienced an error.
TIMED_OUT: The Query timed out.
QueryType
required
The Query type.
Show QueryType
The Query type.
METRIC: Indicates a Metric Query.
STATS: Indicates a Dimension Stats Query.
REPORT: Indicates a Report Query.
RECORDS: Indicates a Record Table Query.
RECORDS_BY_UNIQUE_ID: Indicates records queried by unique ID.
SQL: Indicates a SQL Query.
TOP_VALUES: Indicates a Top Values Query.
QuerySubtype
The Query subtype.
Show QuerySubtype
The Query subtype.
COUNTER: Indicates a Metric counter Query.
TIME_SERIES: Indicates a Metric time series Query.
LEADERBOARD: Indicates a Metric leaderboard Query.
String
required
The SQL the query executed.
Embeddable UI components
Leaderboard component
A React component for rendering leaderboard data.
useLeaderboard
A React Hook for fetching ranked data from the Leaderboard API.
Was this page helpful?
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Propel docs","colors":{"primary":"#53389E","light":"#B692F6","dark":"#42307D"},"favicon":"/logo/favicon.svg","styling":{"eyebrows":null,"codeblocks":"system"},"logo":{"light":"https://mintcdn.com/propeldocs/sNpmg5Sbvcqytj17/logo/light.svg?fit=max\u0026auto=format\u0026n=sNpmg5Sbvcqytj17\u0026q=85\u0026s=9d44dbaa0d94a0b0efe5b94548583b52","dark":"https://mintcdn.com/propeldocs/sNpmg5Sbvcqytj17/logo/dark.svg?fit=max\u0026auto=format\u0026n=sNpmg5Sbvcqytj17\u0026q=85\u0026s=018cb109a52097ee645367f1cabdbac1","href":"https://www.propeldata.com/docs"},"background":{"decoration":"windows"},"navbar":{"links":[{"label":"Sign up","href":"https://console.propeldata.com/get-started"}],"primary":{"type":"button","label":"Console","href":"https://console.propeldata.com"}},"footer":{"socials":{"website":"https://www.propeldata.com","x":"https://x.com/PropelDataCloud","github":"https://github.com/propeldata","linkedin":"https://www.linkedin.com/company/propeldata"}},"integrations":{"gtm":{"tagId":"GTM-KWHDSH7X"},"segment":{"key":"JofuhN1DoSM6E42ZVPcVUN3jqCmyWVP1"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"propeldocs","hasAudioNarration":false,"actualSubdomain":"propeldocs","customDomains":["www.propeldata.com"],"gitSource":{"type":"github","owner":"propeldata","repo":"docsv2","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae921c25a187fc783f53d53:success","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"Embeddable UI","count":72},{"language":"default","tag":"Serverless Cloud","count":65},{"language":"default","tag":"Ingestion","count":44},{"language":"default","tag":"Query APIs","count":40},{"language":"default","tag":"API Reference","count":18},{"language":"default","tag":"Get Started","count":17},{"language":"default","tag":"Guides","count":16},{"language":"default","tag":"Changelog","count":9},{"language":"default","tag":"Manage","count":9},{"language":"default","tag":"Themes","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"docs/query-apis/leaderboard","slug":"/docs/query-apis/leaderboard","pageMetadata":{"title":"Leaderboard","description":"Get aggregated values grouped by common dimensions.","sidebarTitle":"Leaderboard","icon":"trophy","href":"/docs/query-apis/leaderboard"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Get aggregated values grouped by common dimensions.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,CodeGroup,Expandable,Frame,Heading,OptimizedImage,ParamField}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsx(`div`,{}),`\n`,_jsx(Heading,{level:`2`,id:`use-cases`,children:`Use cases`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsxs(Card,{title:`Leaderboard visualization`,children:[_jsx(_components.p,{children:`Visualize leaderboard data in your apps.`}),_jsx(`br`,{}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_1.png?fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=0380b362796590ae138d079ef53c77ff`,\"data-og-width\":`400`,width:`400`,\"data-og-height\":`300`,height:`300`,\"data-path\":`images/docs/leaderboard_use_case_1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_1.png?w=280\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=47d4c7404b30cfd9ffe78524b6b3e6eb 280w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_1.png?w=560\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=9c6016a5d534b0d3bafc4b2f308737ee 560w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_1.png?w=840\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=d6a7eb8e7b1a6d94c4118879ce631210 840w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=1c22c39a65a5028825701d5ae55d9f0d 1100w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=6a99d7c86251852afe38657dbb3d913f 1650w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=5db1161e54c8f6132ce43b0c94c3889b 2500w`})})]}),_jsxs(Card,{title:`Aggregated tables`,children:[_jsx(_components.p,{children:`Display aggregated data in tables.`}),_jsx(`br`,{}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_2.png?fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=925a72dc9e066030ce481bcd6729eb24`,\"data-og-width\":`400`,width:`400`,\"data-og-height\":`300`,height:`300`,\"data-path\":`images/docs/leaderboard_use_case_2.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_2.png?w=280\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=479caeff512af413549a681e0f59b8f1 280w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_2.png?w=560\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=4c18b68654762af4d3570e47488b5f88 560w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_2.png?w=840\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=3d9ceed3497982713ce68066b297b891 840w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_2.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=da45051f72f18ff564ce8bff19834a3c 1100w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_2.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=b05d471bb36d874a734bc763247d1d17 1650w, https://mintcdn.com/propeldocs/9FdNDTkhOu7EgAUd/images/docs/leaderboard_use_case_2.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9FdNDTkhOu7EgAUd\u0026q=85\u0026s=2c1fb6575ab02e1e36292d3abe846443 2500w`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`features`,children:`Features`}),`\n`,_jsxs(_components.p,{children:[`All the `,_jsx(_components.a,{href:`/docs/query-apis/overview#common-features`,children:`common API features`}),`, plus:`]}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Group by dimensions`,icon:`table-columns`,id:`group-by-dimensions`,children:[_jsx(_components.p,{children:`Group the results by one or more dimensions.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`dimensions`}),` in the query to specify the dimensions to group by`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`graphql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`graphql`,children:_jsxs(_components.code,{language:`graphql`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`query`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LeaderboardExample`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` leaderboard`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`input`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dimensions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` columnName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"restaurant_name\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` rows`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Accordion,{title:`Ordering`,icon:`sort`,id:`ordering`,children:[_jsx(_components.p,{children:`Order the results based on a sort direction.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`sort`}),` to specify the sort direction (ASC or DESC)`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`graphql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`graphql`,children:_jsxs(_components.code,{language:`graphql`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`query`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LeaderboardExample`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` leaderboard`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`input`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` DESC`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` rows`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Accordion,{title:`Row limit`,icon:`list`,id:`row-limit`,children:[_jsx(_components.p,{children:`Limit the number of rows returned.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`rowLimit`}),` to specify the maximum number of rows to return`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`graphql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`graphql`,children:_jsxs(_components.code,{language:`graphql`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`query`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LeaderboardExample`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` leaderboard`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`input`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rowLimit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` rows`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(Heading,{level:`3`,id:`example-1-simple-leaderboard-query`,children:`Example 1: Simple leaderboard query`}),`\n`,_jsx(_components.p,{children:`Get top 3 restaurants by total taco sales for the current year.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Query`,numberOfLines:`28`,language:`graphql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`graphql`,children:_jsxs(_components.code,{language:`graphql`,numberOfLines:`28`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`query`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LeaderboardExample1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` leaderboard`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`input`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` metric`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sum`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dataPool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TacoSoft Demo Data\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` measure`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` columnName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"taco_total_price\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` DESC`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` timeRange`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` relative`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THIS_YEAR`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` n`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rowLimit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dimensions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` columnName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"restaurant_name\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` rows`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Response`,numberOfLines:`22`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"leaderboard\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"headers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"restaurant_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"value\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Taqueria Vallarta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"290208.75\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Taqueria Cancun\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"280639\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"La Taqueria\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"276774.75\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsx(Heading,{level:`2`,id:`arguments`,children:`Arguments`}),`\n`,_jsx(_components.p,{children:`The fields for querying a Metric in leaderboard format.`}),`\n`,_jsx(_components.p,{children:`A Metric’s leaderboard query returns an ordered table of Dimension and Metric values over a given time range.`}),`\n`,_jsxs(ParamField,{path:`metric`,type:`MetricInput`,id:`param-metric`,children:[_jsx(_components.p,{children:`The Metric to query. You can query a pre-configured Metric by ID or name, or you can query an ad hoc Metric that you define inline.`}),_jsxs(Expandable,{title:`MetricInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id`,children:_jsx(_components.p,{children:`The ID of a pre-configured Metric.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name`,children:_jsx(_components.p,{children:`The name of a pre-configured Metric.`})}),_jsxs(ParamField,{path:`custom`,type:`CustomMetricQueryInput`,id:`param-custom`,children:[_jsx(_components.p,{children:`An ad hoc Custom Metric.`}),_jsxs(Expandable,{title:`CustomMetricQueryInput`,children:[_jsxs(ParamField,{path:`dataPool`,type:`DataPoolInput`,required:true,id:`param-data-pool`,children:[_jsx(_components.p,{children:`The Data Pool to which this Metric belongs.`}),_jsxs(Expandable,{title:`DataPoolInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id-1`,children:_jsx(_components.p,{children:`The ID of the Data Pool.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name-1`,children:_jsx(_components.p,{children:`The name of the Data Pool.`})})]})]}),_jsx(ParamField,{path:`expression`,type:`String`,required:true,id:`param-expression`,children:_jsx(_components.p,{children:`Custom expression for defining the Metric.`})})]})]}),_jsxs(ParamField,{path:`count`,type:`CountMetricQueryInput`,id:`param-count`,children:[_jsx(_components.p,{children:`An ad hoc Count Metric.`}),_jsx(Expandable,{title:`CountMetricQueryInput`,children:_jsxs(ParamField,{path:`dataPool`,type:`DataPoolInput`,required:true,id:`param-data-pool-1`,children:[_jsx(_components.p,{children:`The Data Pool to which this Metric belongs.`}),_jsxs(Expandable,{title:`DataPoolInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id-2`,children:_jsx(_components.p,{children:`The ID of the Data Pool.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name-2`,children:_jsx(_components.p,{children:`The name of the Data Pool.`})})]})]})})]}),_jsxs(ParamField,{path:`sum`,type:`SumMetricQueryInput`,id:`param-sum`,children:[_jsx(_components.p,{children:`An ad hoc Sum Metric.`}),_jsxs(Expandable,{title:`SumMetricQueryInput`,children:[_jsxs(ParamField,{path:`dataPool`,type:`DataPoolInput`,required:true,id:`param-data-pool-2`,children:[_jsx(_components.p,{children:`The Data Pool to which this Metric belongs.`}),_jsxs(Expandable,{title:`DataPoolInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id-3`,children:_jsx(_components.p,{children:`The ID of the Data Pool.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name-3`,children:_jsx(_components.p,{children:`The name of the Data Pool.`})})]})]}),_jsxs(ParamField,{path:`measure`,type:`DimensionInput`,required:true,id:`param-measure`,children:[_jsx(_components.p,{children:`The column to be summed.`}),_jsxs(Expandable,{title:`DimensionInput`,children:[_jsx(_components.p,{children:`The fields for creating or modifying a Dimension.`}),_jsx(ParamField,{path:`columnName`,type:`String`,required:true,id:`param-column-name`,children:_jsx(_components.p,{children:`The name of the column to create the Dimension from.`})})]})]})]})]}),_jsxs(ParamField,{path:`average`,type:`AverageMetricQueryInput`,id:`param-average`,children:[_jsx(_components.p,{children:`An ad hoc Average Metric.`}),_jsxs(Expandable,{title:`AverageMetricQueryInput`,children:[_jsxs(ParamField,{path:`dataPool`,type:`DataPoolInput`,required:true,id:`param-data-pool-3`,children:[_jsx(_components.p,{children:`The Data Pool to which this Metric belongs.`}),_jsxs(Expandable,{title:`DataPoolInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id-4`,children:_jsx(_components.p,{children:`The ID of the Data Pool.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name-4`,children:_jsx(_components.p,{children:`The name of the Data Pool.`})})]})]}),_jsxs(ParamField,{path:`measure`,type:`DimensionInput`,required:true,id:`param-measure-1`,children:[_jsx(_components.p,{children:`The column to be averaged.`}),_jsxs(Expandable,{title:`DimensionInput`,children:[_jsx(_components.p,{children:`The fields for creating or modifying a Dimension.`}),_jsx(ParamField,{path:`columnName`,type:`String`,required:true,id:`param-column-name-1`,children:_jsx(_components.p,{children:`The name of the column to create the Dimension from.`})})]})]})]})]}),_jsxs(ParamField,{path:`min`,type:`MinMetricQueryInput`,id:`param-min`,children:[_jsx(_components.p,{children:`An ad hoc Min Metric.`}),_jsxs(Expandable,{title:`MinMetricQueryInput`,children:[_jsxs(ParamField,{path:`dataPool`,type:`DataPoolInput`,required:true,id:`param-data-pool-4`,children:[_jsx(_components.p,{children:`The Data Pool to which this Metric belongs.`}),_jsxs(Expandable,{title:`DataPoolInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id-5`,children:_jsx(_components.p,{children:`The ID of the Data Pool.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name-5`,children:_jsx(_components.p,{children:`The name of the Data Pool.`})})]})]}),_jsxs(ParamField,{path:`measure`,type:`DimensionInput`,required:true,id:`param-measure-2`,children:[_jsx(_components.p,{children:`The column to calculate the minimum from.`}),_jsxs(Expandable,{title:`DimensionInput`,children:[_jsx(_components.p,{children:`The fields for creating or modifying a Dimension.`}),_jsx(ParamField,{path:`columnName`,type:`String`,required:true,id:`param-column-name-2`,children:_jsx(_components.p,{children:`The name of the column to create the Dimension from.`})})]})]})]})]}),_jsxs(ParamField,{path:`max`,type:`MaxMetricQueryInput`,id:`param-max`,children:[_jsx(_components.p,{children:`An ad hoc Max Metric.`}),_jsxs(Expandable,{title:`MaxMetricQueryInput`,children:[_jsxs(ParamField,{path:`dataPool`,type:`DataPoolInput`,required:true,id:`param-data-pool-5`,children:[_jsx(_components.p,{children:`The Data Pool to which this Metric belongs.`}),_jsxs(Expandable,{title:`DataPoolInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id-6`,children:_jsx(_components.p,{children:`The ID of the Data Pool.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name-6`,children:_jsx(_components.p,{children:`The name of the Data Pool.`})})]})]}),_jsxs(ParamField,{path:`measure`,type:`DimensionInput`,required:true,id:`param-measure-3`,children:[_jsx(_components.p,{children:`The column to calculate the maximum from.`}),_jsxs(Expandable,{title:`DimensionInput`,children:[_jsx(_components.p,{children:`The fields for creating or modifying a Dimension.`}),_jsx(ParamField,{path:`columnName`,type:`String`,required:true,id:`param-column-name-3`,children:_jsx(_components.p,{children:`The name of the column to create the Dimension from.`})})]})]})]})]}),_jsxs(ParamField,{path:`countDistinct`,type:`CountDistinctMetricQueryInput`,id:`param-count-distinct`,children:[_jsx(_components.p,{children:`An ad hoc Count Distinct Metric.`}),_jsxs(Expandable,{title:`CountDistinctMetricQueryInput`,children:[_jsxs(ParamField,{path:`dataPool`,type:`DataPoolInput`,required:true,id:`param-data-pool-6`,children:[_jsx(_components.p,{children:`The Data Pool to which this Metric belongs.`}),_jsxs(Expandable,{title:`DataPoolInput`,children:[_jsx(ParamField,{path:`id`,type:`ID`,id:`param-id-7`,children:_jsx(_components.p,{children:`The ID of the Data Pool.`})}),_jsx(ParamField,{path:`name`,type:`String`,id:`param-name-7`,children:_jsx(_components.p,{children:`The name of the Data Pool.`})})]})]}),_jsxs(ParamField,{path:`dimension`,type:`DimensionInput`,required:true,id:`param-dimension`,children:[_jsx(_components.p,{children:`The column to count distinct values from.`}),_jsxs(Expandable,{title:`DimensionInput`,children:[_jsx(_components.p,{children:`The fields for creating or modifying a Dimension.`}),_jsx(ParamField,{path:`columnName`,type:`String`,required:true,id:`param-column-name-4`,children:_jsx(_components.p,{children:`The name of the column to create the Dimension from.`})})]})]})]})]})]})]}),`\n`,_jsxs(ParamField,{path:`timeRange`,type:`TimeRangeInput`,id:`param-time-range`,children:[_jsx(_components.p,{children:`The time range for calculating the leaderboard.`}),_jsxs(Expandable,{title:`TimeRangeInput`,children:[_jsx(_components.p,{children:`The fields required to specify the time range for a time series, counter, or leaderboard Metric query.`}),_jsx(_components.p,{children:`If no relative or absolute time ranges are provided, Propel defaults to an absolute time range beginning with the earliest record in the Metric’s Data Pool and ending with the latest record.`}),_jsx(_components.p,{children:`If both relative and absolute time ranges are provided, the relative time range will take precedence.`}),_jsxs(_components.p,{children:[`If a `,_jsx(_components.code,{children:`LAST_N`}),` relative time period is selected, an `,_jsx(_components.code,{children:`n`}),` ≥ 1 must be provided. If no `,_jsx(_components.code,{children:`n`}),` is provided or `,_jsx(_components.code,{children:`n`}),` \u003c 1, a `,_jsx(_components.code,{children:`BAD_REQUEST`}),` error will be returned.`]}),_jsx(ParamField,{path:`timestamp`,type:`String`,id:`param-timestamp`,children:_jsx(_components.p,{children:`The timestamp field to use when querying. Defaults to the timestamp configured on the Data Pool or Metric, if any.\nSet this to filter on an alternative timestamp field.`})}),_jsxs(ParamField,{path:`relative`,type:`RelativeTimeRange`,id:`param-relative`,children:[_jsx(_components.p,{children:`The relative time period.`}),_jsxs(Expandable,{title:`RelativeTimeRange`,children:[_jsx(_components.p,{children:`The Relative time ranges are based on the current date and time.`}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`THIS`}),` - The current unit of time. For example, if today is June 8, 2022, and\n`,_jsx(_components.code,{children:`THIS_MONTH`}),` is selected, then data for June 2022 would be returned.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PREVIOUS`}),` - The previous unit of time. For example, if today is June 8, 2022, and\n`,_jsx(_components.code,{children:`PREVIOUS_MONTH`}),` is selected, then data for May 2022 would be returned. It excludes\nthe current unit of time.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`NEXT`}),` - The next unit of time. For example, if today is June 8, 2022, and\n`,_jsx(_components.code,{children:`NEXT_MONTH`}),` is selected, then data for July 2022 would be returned. It excludes\nthe current unit of time.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`LAST_N`}),` - The last `,_jsx(_components.code,{children:`n`}),` units of time, including the current one. For example, if today\nis June 8, 2022 and `,_jsx(_components.code,{children:`LAST_N_YEARS`}),` with `,_jsx(_components.code,{children:`n`}),` = 3 is selected, then data for 2020, 2021, and\n2022 will be returned. It will include the current time period.`]}),_jsx(ParamField,{path:` `,id:`param`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`THIS_HOUR`}),`: Starts at the zeroth minute of the current hour and continues for 60 minutes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TODAY`}),`: Starts at 12:00:00 AM of the current day and continues for 24 hours.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`THIS_WEEK`}),`: Starts on Monday, 12:00:00 AM of the current week and continues for seven days.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`THIS_MONTH`}),`: Starts at 12:00:00 AM on the first day of the current month and continues for the duration of the month.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`THIS_QUARTER`}),`: Starts at 12:00:00 AM on the first day of the current calendar quarter and continues for the duration of the quarter.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`THIS_YEAR`}),`: Starts on January 1st, 12:00:00 AM of the current year and continues for the duration of the year.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PREVIOUS_HOUR`}),`: Starts at the zeroth minute of the previous hour and continues for 60 minutes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`YESTERDAY`}),`: Starts at 12:00:00 AM on the day before the today and continues for 24 hours.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PREVIOUS_WEEK`}),`: Starts on Monday, 12:00:00 AM, a week before the current week, and continues for seven days.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PREVIOUS_MONTH`}),`: Starts at 12:00:00 AM on the first day of the month before the current month and continues for the duration of the month.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PREVIOUS_QUARTER`}),`: Starts at 12:00:00 AM on the first day of the calendar quarter before the current quarter and continues for the duration of the quarter.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PREVIOUS_YEAR`}),`: Starts on January 1st, 12:00:00 AM, the year before the current year, and continues for the duration of the year.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NEXT_HOUR`}),`: Starts at the zeroth minute of the next hour and continues for 60 minutes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TOMORROW`}),`: ” Starts at 12:00:00 AM, the day after the current day, and continues for 24 hours.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NEXT_WEEK`}),`: Starts on Monday, 12:00:00 AM, the week after the current week, and continues for the duration of the week.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NEXT_MONTH`}),`: Starts at 12:00:00 AM on the first day of the next month and continues for the duration of the month.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NEXT_QUARTER`}),`: Starts at 12:00:00 AM on the first day of the next calendar quarter and continues for the duration of the quarter.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NEXT_YEAR`}),`: Starts on January 1st, 12:00:00 AM of the next year and continues for the duration of the year.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LAST_N_MINUTES`}),`: Starts at the zeroth second `,_jsx(_components.code,{children:`n`}),` - 1 minute(s) before the current minute and continues through the current minute. It includes this minute.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LAST_N_HOURS`}),`: Starts at the zeroth minute of the `,_jsx(_components.code,{children:`n`}),` - 1 hour(s) before the current hour, and continues through the current hour. It includes this hour.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LAST_N_DAYS`}),`: Starts at 12:00:00 AM, `,_jsx(_components.code,{children:`n`}),` - 1 day(s) before the current day, and continues through the current day. It includes today.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LAST_N_WEEKS`}),`: Starts on Monday, 12:00:00 AM, `,_jsx(_components.code,{children:`n`}),` - 1 week(s) before the current week, and continues through the current week. It includes this week.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LAST_N_MONTHS`}),`: Starts at 12:00:00 AM on the first day of the month, `,_jsx(_components.code,{children:`n`}),` - 1 month(s) before the current month, and continues through the current month. It includes this month.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LAST_N_QUARTERS`}),`: Starts at 12:00:00 AM on the first day of the calendar quarter `,_jsx(_components.code,{children:`n`}),` - 1 quarter(s) before the current quarter and continues through the current quarter. It includes this quarter.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LAST_N_YEARS`}),`: Starts on January 1st, 12:00:00 AM of the year `,_jsx(_components.code,{children:`n`}),` - 1 year(s) before the current year and continues through the current year. It includes this year.`]}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_15_MINUTES`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_30_MINUTES`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_HOUR`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_4_HOURS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_12_HOURS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_24_HOURS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_7_DAYS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_30_DAYS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_90_DAYS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_3_MONTHS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_6_MONTHS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_YEAR`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_2_YEARS`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`LAST_5_YEARS`})}),`\n`]})})]})]}),_jsx(ParamField,{path:`n`,type:`Int`,id:`param-n`,children:_jsxs(_components.p,{children:[`The number of time units for the `,_jsx(_components.code,{children:`LAST_N`}),` relative periods.`]})}),_jsx(ParamField,{path:`start`,type:`DateTime`,id:`param-start`,children:_jsx(_components.p,{children:`The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.`})}),_jsx(ParamField,{path:`stop`,type:`DateTime`,id:`param-stop`,children:_jsx(_components.p,{children:`The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.`})})]})]}),`\n`,_jsxs(ParamField,{path:`timeZone`,type:`String`,id:`param-time-zone`,children:[_jsx(_components.p,{children:`The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.`}),_jsxs(_components.p,{children:[`You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the `,_jsx(_components.a,{href:`https://en.wikipedia.org/wiki/Tz_database`,children:`IANA time zone database`}),`. Defaults to “UTC”.`]})]}),`\n`,_jsxs(ParamField,{path:`dimensions`,type:`[DimensionInput!]`,required:true,id:`param-dimensions`,children:[_jsx(_components.p,{children:`One or many Dimensions to group the Metric values by. Typically, Dimensions in a leaderboard are what you want to compare and rank.`}),_jsxs(Expandable,{title:`DimensionInput`,children:[_jsx(_components.p,{children:`The fields for creating or modifying a Dimension.`}),_jsx(ParamField,{path:`columnName`,type:`String`,required:true,id:`param-column-name-5`,children:_jsx(_components.p,{children:`The name of the column to create the Dimension from.`})})]})]}),`\n`,_jsxs(ParamField,{path:`sort`,type:`Sort`,id:`param-sort`,children:[_jsxs(_components.p,{children:[`The sort order of the rows. It can be ascending (`,_jsx(_components.code,{children:`ASC`}),`) or descending (`,_jsx(_components.code,{children:`DESC`}),`) order. Defaults to descending (`,_jsx(_components.code,{children:`DESC`}),`) order when not provided.`]}),_jsxs(Expandable,{title:`Sort`,children:[_jsx(_components.p,{children:`The available sort orders.`}),_jsx(ParamField,{path:` `,id:`param-1`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ASC`}),`: Sort in ascending order.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DESC`}),`: Sort in descending order.`]}),`\n`]})})]})]}),`\n`,_jsx(ParamField,{path:`rowLimit`,type:`Int`,required:true,id:`param-row-limit`,children:_jsx(_components.p,{children:`The number of rows to be returned. It can be a number between 1 and 1,000.`})}),`\n`,_jsx(ParamField,{path:`filterSql`,type:`String`,id:`param-filter-sql`,children:_jsx(_components.p,{children:`The Query Filters to apply before retrieving the leaderboard data, in the form of SQL. If no Query Filters are provided, all data is included.`})}),`\n`,_jsxs(Expandable,{title:`Deprecated Fields`,children:[_jsxs(ParamField,{path:`metricId`,type:`ID`,deprecated:true,id:`param-metric-id`,children:[_jsx(_components.p,{children:`The ID of the Metric to query.`}),_jsxs(_components.p,{children:[`Required if `,_jsx(_components.code,{children:`metricName`}),` is not specified.`]}),_jsxs(`span`,{style:{fontStyle:`italic`},children:[`deprecated: Use `,_jsx(_components.code,{children:`metric`})]})]}),_jsxs(ParamField,{path:`metricName`,type:`String`,deprecated:true,id:`param-metric-name`,children:[_jsx(_components.p,{children:`The name of the Metric to query.`}),_jsxs(_components.p,{children:[`Required if `,_jsx(_components.code,{children:`metricId`}),` is not specified.`]}),_jsxs(`span`,{style:{fontStyle:`italic`},children:[`deprecated: Use `,_jsx(_components.code,{children:`metric`})]})]}),_jsxs(ParamField,{path:`filters`,type:`[FilterInput!]`,deprecated:true,id:`param-filters`,children:[_jsx(_components.p,{children:`The Query Filters to apply before retrieving the leaderboard data. If no Query Filters are provided, all data is included.`}),_jsxs(`span`,{style:{fontStyle:`italic`},children:[`deprecated: Use `,_jsx(_components.code,{children:`filterSql`}),` instead`]}),_jsxs(Expandable,{title:`FilterInput`,children:[_jsx(_components.p,{children:`The fields of a filter.`}),_jsxs(_components.p,{children:[`You can construct more complex filters using `,_jsx(_components.code,{children:`and`}),` and `,_jsx(_components.code,{children:`or`}),`. For example, to construct a filter equivalent to`]}),_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(value > 0 AND value \u003c= 100) OR status = \"confirmed\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(_components.p,{children:`you could write`}),_jsx(CodeBlock,{numberOfLines:`16`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"column\": \"value\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"operator\": \"GREATER_THAN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"value\": \"0\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"and\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"column\": \"value\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"operator\": \"LESS_THAN_OR_EQUAL_TO\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"value\": \"0\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"or\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"column\": \"status\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"operator\": \"EQUALS\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"value\": \"confirmed\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Note that `,_jsx(_components.code,{children:`and`}),` takes precedence over `,_jsx(_components.code,{children:`or`}),`.`]}),_jsx(ParamField,{path:`column`,type:`String`,required:true,id:`param-column`,children:_jsx(_components.p,{children:`The name of the column to filter on.`})}),_jsxs(ParamField,{path:`operator`,type:`FilterOperator`,required:true,id:`param-operator`,children:[_jsx(_components.p,{children:`The operation to perform when comparing the column and filter values.`}),_jsxs(Expandable,{title:`FilterOperator`,children:[_jsx(_components.p,{children:`The available Filter operators.`}),_jsx(ParamField,{path:` `,id:`param-2`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`EQUALS`}),`: Selects values that are equal to the specified value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NOT_EQUALS`}),`: Selects values that are not equal to the specified value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GREATER_THAN`}),`: Selects values that are greater than the specified value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GREATER_THAN_OR_EQUAL_TO`}),`: Selects values that are greater or equal to the specified value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LESS_THAN`}),`: Selects values that are less than the specified value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LESS_THAN_OR_EQUAL_TO`}),`: Selects values that are less or equal to the specified value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`IS_NULL`}),`: Selects values that are null. This operator does not accept a value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`IS_NOT_NULL`}),`: Selects values that are not null. This operator does not accept a value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LIKE`}),`: Selects values that match the specified pattern.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NOT_LIKE`}),`: “Selects values that do not match the specified pattern.`]}),`\n`]})})]})]}),_jsx(ParamField,{path:`value`,type:`String`,id:`param-value`,children:_jsx(_components.p,{children:`The value to compare the column to.`})}),_jsx(ParamField,{path:`and`,type:`[FilterInput!]`,id:`param-and`,children:_jsx(_components.p,{children:`Additional filters to AND with this one. AND takes precedence over OR.`})}),_jsx(ParamField,{path:`or`,type:`[FilterInput!]`,id:`param-or`,children:_jsx(_components.p,{children:`Additional filters to OR with this one. AND takes precedence over OR.`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`The leaderboard response object. It contains an array of headers and a table (array of rows) with the selected Dimensions and corresponding Metric values for the given time range and Query Filters.`}),`\n`,_jsx(ParamField,{path:`headers`,type:`[String!]`,required:true,id:`param-headers`,children:_jsx(_components.p,{children:`The table headers. It contains the Dimension and Metric names.`})}),`\n`,_jsx(ParamField,{path:`rows`,type:`[[String]!]`,required:true,id:`param-rows`,children:_jsx(_components.p,{children:`An ordered array of rows. Each row contains the Dimension values and the corresponding Metric value. A Dimension value can be empty. A Metric value will never be empty.`})}),`\n`,_jsxs(ParamField,{path:`query`,type:`QueryInfo`,required:true,id:`param-query`,children:[_jsx(_components.p,{children:`The Query statistics and metadata.`}),_jsxs(Expandable,{title:`QueryInfo`,children:[_jsx(_components.p,{children:`The Query Info object. It contains metadata and statistics about a Query performed.`}),_jsx(ParamField,{path:`id`,type:`ID`,required:true,id:`param-id-8`,children:_jsx(_components.p,{children:`The Query’s unique identifier.`})}),_jsx(ParamField,{path:`createdAt`,type:`DateTime`,required:true,id:`param-created-at`,children:_jsx(_components.p,{children:`The date and time in UTC when the Query was created.`})}),_jsx(ParamField,{path:`createdBy`,type:`String`,required:true,id:`param-created-by`,children:_jsx(_components.p,{children:`The unique identifier of the actor that performed the Query.`})}),_jsx(ParamField,{path:`modifiedAt`,type:`DateTime`,required:true,id:`param-modified-at`,children:_jsx(_components.p,{children:`The date and time in UTC when the Query was last modified.`})}),_jsx(ParamField,{path:`modifiedBy`,type:`String`,required:true,id:`param-modified-by`,children:_jsx(_components.p,{children:`The unique identifier of the actor that modified the Query.`})}),_jsx(ParamField,{path:`bytesProcessed`,type:`String`,required:true,id:`param-bytes-processed`,children:_jsx(_components.p,{children:`The bytes processed by the Query.`})}),_jsx(ParamField,{path:`durationInMilliseconds`,type:`Int`,required:true,id:`param-duration-in-milliseconds`,children:_jsx(_components.p,{children:`The duration of the Query in milliseconds.`})}),_jsx(ParamField,{path:`recordsProcessed`,type:`String`,required:true,id:`param-records-processed`,children:_jsx(_components.p,{children:`The number of records processed by the Query.`})}),_jsx(ParamField,{path:`resultingBytes`,type:`Int`,required:true,id:`param-resulting-bytes`,children:_jsx(_components.p,{children:`The bytes returned by the Query.`})}),_jsx(ParamField,{path:`resultingRecords`,type:`Int`,required:true,id:`param-resulting-records`,children:_jsx(_components.p,{children:`The number of records returned by the Query.`})}),_jsxs(ParamField,{path:`propeller`,type:`Propeller`,id:`param-propeller`,children:[_jsx(_components.p,{children:`The Propeller used for this query.`}),_jsxs(Expandable,{title:`Propeller`,children:[_jsx(_components.p,{children:`A Propeller determines your Application’s query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.`}),_jsx(ParamField,{path:` `,id:`param-3`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`P1_X_SMALL`}),`: Max records per second: 5,000,000 records per second`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`P1_SMALL`}),`: Max records per second: 25,000,000 records per second`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`P1_MEDIUM`}),`: Max records per second: 100,000,000 records per second`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`P1_LARGE`}),`: Max records per second: 250,000,000 records per second`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`P1_X_LARGE`}),`: Max records per second: 500,000,000 records per second`]}),`\n`]})})]})]}),_jsxs(ParamField,{path:`status`,type:`QueryStatus`,required:true,id:`param-status`,children:[_jsx(_components.p,{children:`The Query status.`}),_jsxs(Expandable,{title:`QueryStatus`,children:[_jsx(_components.p,{children:`The Query status.`}),_jsx(ParamField,{path:` `,id:`param-4`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`COMPLETED`}),`: The Query was completed succesfully.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ERROR`}),`: The Query experienced an error.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TIMED_OUT`}),`: The Query timed out.`]}),`\n`]})})]})]}),_jsxs(ParamField,{path:`type`,type:`QueryType`,required:true,id:`param-type`,children:[_jsx(_components.p,{children:`The Query type.`}),_jsxs(Expandable,{title:`QueryType`,children:[_jsx(_components.p,{children:`The Query type.`}),_jsx(ParamField,{path:` `,id:`param-5`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`METRIC`}),`: Indicates a Metric Query.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`STATS`}),`: Indicates a Dimension Stats Query.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`REPORT`}),`: Indicates a Report Query.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`RECORDS`}),`: Indicates a Record Table Query.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`RECORDS_BY_UNIQUE_ID`}),`: Indicates records queried by unique ID.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`SQL`}),`: Indicates a SQL Query.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TOP_VALUES`}),`: Indicates a Top Values Query.`]}),`\n`]})})]})]}),_jsxs(ParamField,{path:`subtype`,type:`QuerySubtype`,id:`param-subtype`,children:[_jsx(_components.p,{children:`The Query subtype.`}),_jsxs(Expandable,{title:`QuerySubtype`,children:[_jsx(_components.p,{children:`The Query subtype.`}),_jsx(ParamField,{path:` `,id:`param-6`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`COUNTER`}),`: Indicates a Metric counter Query.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TIME_SERIES`}),`: Indicates a Metric time series Query.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LEADERBOARD`}),`: Indicates a Metric leaderboard Query.`]}),`\n`]})})]})]}),_jsx(ParamField,{path:`sql`,type:`String`,required:true,id:`param-sql`,children:_jsx(_components.p,{children:`The SQL the query executed.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`embeddable-ui-components`,children:`Embeddable UI components`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Leaderboard component`,icon:`React`,href:`/docs/embeddable-ui/components/leaderboard`,children:_jsx(_components.p,{children:`A React component for rendering leaderboard data.`})}),_jsx(Card,{title:`useLeaderboard`,icon:`code`,href:`/docs/embeddable-ui/components/use-leaderboard`,children:_jsx(_components.p,{children:`A React Hook for fetching ranked data from the Leaderboard API.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Leaderboard","description":"Get aggregated values grouped by common dimensions.","sidebarTitle":"Leaderboard","icon":"trophy","href":"/docs/query-apis/leaderboard"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Use cases","slug":"use-cases","depth":2,"children":[]},{"title":"Features","slug":"features","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[{"title":"Example 1: Simple leaderboard query","slug":"example-1-simple-leaderboard-query","depth":3,"children":[]}]},{"title":"Usage","slug":"usage","depth":2,"children":[]},{"title":"Arguments","slug":"arguments","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Embeddable UI components","slug":"embeddable-ui-components","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/propeldocs/fdbfad1497ca4ff4/scripts/generate-query-api-snippets.js","/_mintlify/custom/propeldocs/8980ee81dee9a13b/scripts/generate-ui-kit-props-snippets.js","/_mintlify/custom/propeldocs/14bd85a0d423341a/scripts/consts.js","/_mintlify/custom/propeldocs/0cf47d21a6c8aab3/scripts/utils.js","/_mintlify/custom/propeldocs/40b44e6573c8c018/scripts/generate-management-api-pages.js","/_mintlify/custom/propeldocs/51bba4061f9f89d8/scripts/delete-heavy-docs.js","/_mintlify/custom/propeldocs/cdc5ec9e555dee6e/scripts/generate-docs.js","/_mintlify/custom/propeldocs/45c00fb3854a3468/scripts/patch-embed-snippets.js","/_mintlify/custom/propeldocs/9a2f4a8c729adeab/scripts/get-radix-type-as-json.js"],"subdomain":"propeldocs","siteName":"Propel docs","title":"Leaderboard - Propel docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T03:52:37.609Z","originalFileLocation":"docs/query-apis/leaderboard.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Get aggregated values grouped by common dimensions.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Propel docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Leaderboard - Propel docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get aggregated values grouped by common dimensions.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Propel docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.propeldata.com/docs/query-apis/leaderboard\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://propeldocs.mintlify.site/_mintlify/api/og/v2?division=APIs\u0026amp;title=Leaderboard\u0026amp;description=Get+aggregated+values+grouped+by+common+dimensions.\u0026amp;theme=f9dc867360e0a88fa037a043\u0026amp;signature=e6391f429ac8e76926e8c732c7039b9ccbaea1a3343cc3317f19725267628b7d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Leaderboard - Propel docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get aggregated values grouped by common dimensions.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://propeldocs.mintlify.site/_mintlify/api/og/v2?division=APIs\u0026amp;title=Leaderboard\u0026amp;description=Get+aggregated+values+grouped+by+common+dimensions.\u0026amp;theme=f9dc867360e0a88fa037a043\u0026amp;signature=e6391f429ac8e76926e8c732c7039b9ccbaea1a3343cc3317f19725267628b7d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/propeldocs/6xpBSdoUNIH7T1a1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Propel docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#53389E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.propeldata.com/docs/query-apis/leaderboard\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/query-apis/leaderboard.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.propeldata.com/#organization\",\"name\":\"Propel docs\",\"url\":\"https://www.propeldata.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/propeldocs/sNpmg5Sbvcqytj17/logo/light.svg?fit=max\u0026auto=format\u0026n=sNpmg5Sbvcqytj17\u0026q=85\u0026s=9d44dbaa0d94a0b0efe5b94548583b52\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.propeldata.com#website\",\"name\":\"Propel docs\",\"url\":\"https://www.propeldata.com\",\"publisher\":{\"@id\":\"https://www.propeldata.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.propeldata.com/docs/query-apis/leaderboard#webpage\",\"url\":\"https://www.propeldata.com/docs/query-apis/leaderboard\",\"name\":\"Leaderboard\",\"description\":\"Get aggregated values grouped by common dimensions.\",\"dateModified\":\"2026-01-07T03:52:37.609Z\",\"isPartOf\":{\"@id\":\"https://www.propeldata.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.propeldata.com/docs/query-apis/leaderboard#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.propeldata.com/docs/query-apis/leaderboard#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"APIs\",\"item\":\"https://www.propeldata.com/docs/query-apis/sql-api\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Leaderboard\",\"item\":\"https://www.propeldata.com/docs/query-apis/leaderboard\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.propeldata.com/docs/query-apis/leaderboard#article\",\"headline\":\"Leaderboard\",\"name\":\"Leaderboard\",\"description\":\"Get aggregated values grouped by common dimensions.\",\"url\":\"https://www.propeldata.com/docs/query-apis/leaderboard\",\"mainEntityOfPage\":{\"@id\":\"https://www.propeldata.com/docs/query-apis/leaderboard#webpage\"},\"dateModified\":\"2026-01-07T03:52:37.609Z\",\"publisher\":{\"@id\":\"https://www.propeldata.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.propeldata.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Propel docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Propel docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/query-apis/leaderboard.md","siteName":"Propel docs","nav":{"global":null,"tabs":[{"tab":"Serverless Cloud","pages":[{"title":"Serverless Cloud","href":"/docs/overview"}]},{"tab":"Ingestion","pages":[{"title":"Ingestion","href":"/docs/ingestion/overview"}]},{"tab":"Query APIs","anchors":[{"anchor":"Query APIs","icon":"house","groups":[{"group":"Get Started","pages":[{"title":"Query APIs","sidebarTitle":"Overview","icon":"gear-code","mode":"wide","href":"/docs/query-apis/overview"},{"title":"Authentication","sidebarTitle":"Authentication","icon":"key","href":"/docs/query-apis/authentication"}]},{"group":"APIs","pages":[{"title":"SQL API","sidebarTitle":"SQL API","icon":"database","href":"/docs/query-apis/sql-api"},{"title":"Counter","sidebarTitle":"Counter","icon":"calculator","href":"/docs/query-apis/counter"},{"title":"Data Grid","description":"Get a table of records from a Data Pool.","sidebarTitle":"Data Grid","icon":"table","href":"/docs/query-apis/data-grid"},{"title":"Leaderboard","sidebarTitle":"Leaderboard","icon":"trophy","href":"/docs/query-apis/leaderboard"},{"title":"Metric report","description":"Get multiple aggregated values grouped by common dimensions.","sidebarTitle":"Metric Report","icon":"file-chart-column","href":"/docs/query-apis/metric-report"},{"title":"Time Series","sidebarTitle":"Time Series","icon":"chart-line","href":"/docs/query-apis/time-series"},{"title":"Top values","sidebarTitle":"Top Values","icon":"list-ol","href":"/docs/query-apis/top-values"}]},{"group":"Metrics","pages":[{"title":"Metrics","sidebarTitle":"Overview","icon":"gauge","mode":"wide","href":"/docs/query-apis/metrics"},{"title":"Types of Metrics","sidebarTitle":"Types of Metrics","icon":"list","href":"/docs/query-apis/types-of-metrics"},{"title":"Defining Metrics","sidebarTitle":"Defining Metrics","icon":"calculator-simple","href":"/docs/query-apis/defining-metrics"}]},{"group":"Guides","pages":[{"title":"Querying JSON data","sidebarTitle":"Querying JSON","icon":"brackets-curly","href":"/docs/query-apis/guides/querying-json"},{"title":"Make multiple GraphQL queries in a single request","sidebarTitle":"Multiple queries","icon":"file-chart-column","href":"/docs/query-apis/guides/how-to-make-multiple-graphQL-queries-in-one-request"},{"title":"Working with timezones","sidebarTitle":"Timezones","icon":"globe","href":"/docs/query-apis/guides/working-with-timezones"},{"title":"Pagination","sidebarTitle":"Pagination","icon":"file-spreadsheet","href":"/docs/query-apis/guides/pagination"},{"title":"Unique names","sidebarTitle":"Unique names","icon":"tag","href":"/docs/query-apis/guides/unique-names"}]}]},{"anchor":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/docs/query-apis/api-reference/overview"}]}]},{"tab":"Embeddable UI","pages":[{"title":"Embeddable UI","href":"/docs/embeddable-ui/introduction"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog/2024"}]}]},"basePath":"","title":"Leaderboard - Propel docs","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CG7QalVD.js","DynamicMarkdown-B_9ywLDq.js","zoom-image-lightbox-uS0aI388.js","lightbox-handle-r17bVUz3.js"]}