> ## Documentation Index
> Fetch the complete documentation index at: https://www.propeldata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inputs

> Input types in the Query API

<div />

## DimensionInput

The fields for creating or modifying a Dimension.

<ParamField path="columnName" type="String" required>
  The name of the column to create the Dimension from.
</ParamField>

## DataGridInput

The fields for querying Data Grid records.

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to be queried.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeRange" type="TimeRangeInput">
  The time range for retrieving the records.

  <Expandable title="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.

    <ParamField path="timestamp" type="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.
    </ParamField>

    <ParamField path="relative" type="RelativeTimeRange">
      The relative time period.

      <Expandable title="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.

        <ParamField path=" ">
          * `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`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="n" type="Int">
      The number of time units for the `LAST_N` relative periods.
    </ParamField>

    <ParamField path="start" type="DateTime">
      The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
    </ParamField>

    <ParamField path="stop" type="DateTime">
      The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeZone" type="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](https://en.wikipedia.org/wiki/Tz_database). Defaults to "UTC".
</ParamField>

<ParamField path="columns" type="[String!]" required>
  The columns to retrieve.
</ParamField>

<ParamField path="orderByColumn" type="Int">
  The index of the column to order the table by. The index is 1-based. If not provided, records will be ordered by their timestamp by default.
</ParamField>

<ParamField path="sort" type="Sort">
  The sort order of the rows. It can be ascending (`ASC`) or descending (`DESC`) order. Defaults to descending (`DESC`) order when not provided.

  <Expandable title="Sort">
    The available sort orders.

    <ParamField path=" ">
      * `ASC`: Sort in ascending order.
      * `DESC`: Sort in descending order.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="filterSql" type="String">
  The filters to apply to the records, in the form of SQL. You may only filter on columns included in the `columns` array input.
</ParamField>

<ParamField path="first" type="Int">
  The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
</ParamField>

<ParamField path="after" type="String">
  The cursor to use when paging forward.
</ParamField>

<ParamField path="last" type="Int">
  The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
</ParamField>

<ParamField path="before" type="String">
  The cursor to use when paging backward.
</ParamField>

<Expandable title="Deprecated Fields">
  <ParamField path="filters" type="[FilterInput!]" deprecated>
    The filters to apply to the records. You may only filter on columns included in the `columns` array input.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `filterSql` instead</span>

    <Expandable title="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"
      ```

      you could write

      ```
      {
        "column": "value",
        "operator": "GREATER_THAN",
        "value": "0",
        "and": [{
          "column": "value",
          "operator": "LESS_THAN_OR_EQUAL_TO",
          "value": "0"
        }],
        "or": [{
          "column": "status",
          "operator": "EQUALS",
          "value": "confirmed"
        }]
      }
      ```

      Note that `and` takes precedence over `or`.

      <ParamField path="column" type="String" required>
        The name of the column to filter on.
      </ParamField>

      <ParamField path="operator" type="FilterOperator" required>
        The operation to perform when comparing the column and filter values.

        <Expandable title="FilterOperator">
          The available Filter operators.

          <ParamField path=" ">
            * `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.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="value" type="String">
        The value to compare the column to.
      </ParamField>

      <ParamField path="and" type="[FilterInput!]">
        Additional filters to AND with this one. AND takes precedence over OR.
      </ParamField>

      <ParamField path="or" type="[FilterInput!]">
        Additional filters to OR with this one. AND takes precedence over OR.
      </ParamField>
    </Expandable>
  </ParamField>
</Expandable>

## MetricReportInput

The fields for querying a Metric Report.

A Metric Report is a table whose columns include dimensions and Metric values, calculated over a given time range.

<ParamField path="timeRange" type="TimeRangeInput">
  The time range for calculating the Metric Report.

  <Expandable title="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.

    <ParamField path="timestamp" type="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.
    </ParamField>

    <ParamField path="relative" type="RelativeTimeRange">
      The relative time period.

      <Expandable title="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.

        <ParamField path=" ">
          * `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`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="n" type="Int">
      The number of time units for the `LAST_N` relative periods.
    </ParamField>

    <ParamField path="start" type="DateTime">
      The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
    </ParamField>

    <ParamField path="stop" type="DateTime">
      The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeZone" type="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](https://en.wikipedia.org/wiki/Tz_database). Defaults to "UTC".
</ParamField>

<ParamField path="dimensions" type="[MetricReportDimensionInput!]" required>
  One or many dimensions to group the Metric values by. Typically, dimensions in a report are what you want to compare and rank.

  <Expandable title="MetricReportDimensionInput">
    The fields for specifying a dimension to include in a Metric Report.

    <ParamField path="columnName" type="String" required>
      The column name of the dimension to include in a Metric Report. This must match the name of a Data Pool column.
    </ParamField>

    <ParamField path="displayName" type="String">
      The name to display in the `headers` array when displaying the report. This defaults to the column name if unspecified.
    </ParamField>

    <ParamField path="sort" type="Sort">
      The sort order for the dimension. It can be ascending (`ASC`) or descending (`DESC`) order. Defaults to ascending (`ASC`) order when not provided.

      <Expandable title="Sort">
        The available sort orders.

        <ParamField path=" ">
          * `ASC`: Sort in ascending order.
          * `DESC`: Sort in descending order.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="metrics" type="[MetricReportMetricInput!]" required>
  One or more Metrics to include in the Metric Report. These will be broken down by `dimensions`.

  <Expandable title="MetricReportMetricInput">
    The fields for specifying a Metric to include in a Metric Report.

    <ParamField path="metric" type="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.

      <Expandable title="MetricInput">
        <ParamField path="id" type="ID">
          The ID of a pre-configured Metric.
        </ParamField>

        <ParamField path="name" type="String">
          The name of a pre-configured Metric.
        </ParamField>

        <ParamField path="custom" type="CustomMetricQueryInput">
          An ad hoc Custom Metric.

          See <a href="/docs/query-apis/api-reference/inputs#custommetricqueryinput">CustomMetricQueryInput</a>
        </ParamField>

        <ParamField path="count" type="CountMetricQueryInput">
          An ad hoc Count Metric.

          See <a href="/docs/query-apis/api-reference/inputs#countmetricqueryinput">CountMetricQueryInput</a>
        </ParamField>

        <ParamField path="sum" type="SumMetricQueryInput">
          An ad hoc Sum Metric.

          See <a href="/docs/query-apis/api-reference/inputs#summetricqueryinput">SumMetricQueryInput</a>
        </ParamField>

        <ParamField path="average" type="AverageMetricQueryInput">
          An ad hoc Average Metric.

          See <a href="/docs/query-apis/api-reference/inputs#averagemetricqueryinput">AverageMetricQueryInput</a>
        </ParamField>

        <ParamField path="min" type="MinMetricQueryInput">
          An ad hoc Min Metric.

          See <a href="/docs/query-apis/api-reference/inputs#minmetricqueryinput">MinMetricQueryInput</a>
        </ParamField>

        <ParamField path="max" type="MaxMetricQueryInput">
          An ad hoc Max Metric.

          See <a href="/docs/query-apis/api-reference/inputs#maxmetricqueryinput">MaxMetricQueryInput</a>
        </ParamField>

        <ParamField path="countDistinct" type="CountDistinctMetricQueryInput">
          An ad hoc Count Distinct Metric.

          See <a href="/docs/query-apis/api-reference/inputs#countdistinctmetricqueryinput">CountDistinctMetricQueryInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="displayName" type="String">
      The name to display in the `headers` array when displaying the report. This defaults to the Metric's unique name if unspecified.
    </ParamField>

    <ParamField path="filterSql" type="String">
      The Query Filters to apply when calculating the Metric, in the form of SQL.
    </ParamField>

    <ParamField path="sort" type="Sort">
      The sort order for the Metric. It can be ascending (`ASC`) or descending (`DESC`) order. Defaults to descending (`DESC`) order when not provided.

      <Expandable title="Sort">
        The available sort orders.

        <ParamField path=" ">
          * `ASC`: Sort in ascending order.
          * `DESC`: Sort in descending order.
        </ParamField>
      </Expandable>
    </ParamField>

    <Expandable title="Deprecated Fields">
      <ParamField path="uniqueName" type="String" deprecated>
        The Metric's unique name. If not specified, Propel will lookup the Metric by ID.

        <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
      </ParamField>

      <ParamField path="id" type="ID" deprecated>
        The Metric's ID. If not specified, Propel will lookup the Metric by unique name.

        <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
      </ParamField>

      <ParamField path="filters" type="[FilterInput!]" deprecated>
        The Query Filters to apply when calculating the Metric.

        <span style={{ fontStyle: 'italic' }}>deprecated: Use `filterSql` instead</span>

        <Expandable title="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"
          ```

          you could write

          ```
          {
            "column": "value",
            "operator": "GREATER_THAN",
            "value": "0",
            "and": [{
              "column": "value",
              "operator": "LESS_THAN_OR_EQUAL_TO",
              "value": "0"
            }],
            "or": [{
              "column": "status",
              "operator": "EQUALS",
              "value": "confirmed"
            }]
          }
          ```

          Note that `and` takes precedence over `or`.

          <ParamField path="column" type="String" required>
            The name of the column to filter on.
          </ParamField>

          <ParamField path="operator" type="FilterOperator" required>
            The operation to perform when comparing the column and filter values.

            See <a href="/docs/query-apis/api-reference/enums#filteroperator">FilterOperator</a>
          </ParamField>

          <ParamField path="value" type="String">
            The value to compare the column to.
          </ParamField>

          <ParamField path="and" type="[FilterInput!]">
            Additional filters to AND with this one. AND takes precedence over OR.
          </ParamField>

          <ParamField path="or" type="[FilterInput!]">
            Additional filters to OR with this one. AND takes precedence over OR.
          </ParamField>
        </Expandable>
      </ParamField>
    </Expandable>
  </Expandable>
</ParamField>

<ParamField path="filterSql" type="String">
  The Query Filters to apply when building the Metric Report, in the form of SQL. These can be used to filter out rows.
</ParamField>

<ParamField path="orderByColumn" type="Int">
  The index of the column to order the Metric Report by. The index is 1-based and defaults to the first Metric column. In other words, by default, reports are ordered by the first Metric; however, you can order by the second Metric, third Metric, etc., by overriding the `orderByColumn` input. You can also order by dimensions this way.
</ParamField>

<ParamField path="first" type="Int">
  The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
</ParamField>

<ParamField path="after" type="String">
  The cursor to use when paging forward.
</ParamField>

<ParamField path="last" type="Int">
  The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
</ParamField>

<ParamField path="before" type="String">
  The cursor to use when paging backward.
</ParamField>

<Expandable title="Deprecated Fields">
  <ParamField path="filters" type="[FilterInput!]" deprecated>
    The Query Filters to apply when building the Metric Report. These can be used to filter out rows.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `filterSql` instead</span>

    <Expandable title="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"
      ```

      you could write

      ```
      {
        "column": "value",
        "operator": "GREATER_THAN",
        "value": "0",
        "and": [{
          "column": "value",
          "operator": "LESS_THAN_OR_EQUAL_TO",
          "value": "0"
        }],
        "or": [{
          "column": "status",
          "operator": "EQUALS",
          "value": "confirmed"
        }]
      }
      ```

      Note that `and` takes precedence over `or`.

      <ParamField path="column" type="String" required>
        The name of the column to filter on.
      </ParamField>

      <ParamField path="operator" type="FilterOperator" required>
        The operation to perform when comparing the column and filter values.

        <Expandable title="FilterOperator">
          The available Filter operators.

          <ParamField path=" ">
            * `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.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="value" type="String">
        The value to compare the column to.
      </ParamField>

      <ParamField path="and" type="[FilterInput!]">
        Additional filters to AND with this one. AND takes precedence over OR.
      </ParamField>

      <ParamField path="or" type="[FilterInput!]">
        Additional filters to OR with this one. AND takes precedence over OR.
      </ParamField>
    </Expandable>
  </ParamField>
</Expandable>

## MetricReportDimensionInput

The fields for specifying a dimension to include in a Metric Report.

<ParamField path="columnName" type="String" required>
  The column name of the dimension to include in a Metric Report. This must match the name of a Data Pool column.
</ParamField>

<ParamField path="displayName" type="String">
  The name to display in the `headers` array when displaying the report. This defaults to the column name if unspecified.
</ParamField>

<ParamField path="sort" type="Sort">
  The sort order for the dimension. It can be ascending (`ASC`) or descending (`DESC`) order. Defaults to ascending (`ASC`) order when not provided.

  <Expandable title="Sort">
    The available sort orders.

    <ParamField path=" ">
      * `ASC`: Sort in ascending order.
      * `DESC`: Sort in descending order.
    </ParamField>
  </Expandable>
</ParamField>

## MetricReportMetricInput

The fields for specifying a Metric to include in a Metric Report.

<ParamField path="metric" type="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.

  <Expandable title="MetricInput">
    <ParamField path="id" type="ID">
      The ID of a pre-configured Metric.
    </ParamField>

    <ParamField path="name" type="String">
      The name of a pre-configured Metric.
    </ParamField>

    <ParamField path="custom" type="CustomMetricQueryInput">
      An ad hoc Custom Metric.

      <Expandable title="CustomMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="expression" type="String" required>
          Custom expression for defining the Metric.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="count" type="CountMetricQueryInput">
      An ad hoc Count Metric.

      <Expandable title="CountMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="sum" type="SumMetricQueryInput">
      An ad hoc Sum Metric.

      <Expandable title="SumMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be summed.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="average" type="AverageMetricQueryInput">
      An ad hoc Average Metric.

      <Expandable title="AverageMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be averaged.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="min" type="MinMetricQueryInput">
      An ad hoc Min Metric.

      <Expandable title="MinMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the minimum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="max" type="MaxMetricQueryInput">
      An ad hoc Max Metric.

      <Expandable title="MaxMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the maximum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="countDistinct" type="CountDistinctMetricQueryInput">
      An ad hoc Count Distinct Metric.

      <Expandable title="CountDistinctMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="dimension" type="DimensionInput" required>
          The column to count distinct values from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="displayName" type="String">
  The name to display in the `headers` array when displaying the report. This defaults to the Metric's unique name if unspecified.
</ParamField>

<ParamField path="filterSql" type="String">
  The Query Filters to apply when calculating the Metric, in the form of SQL.
</ParamField>

<ParamField path="sort" type="Sort">
  The sort order for the Metric. It can be ascending (`ASC`) or descending (`DESC`) order. Defaults to descending (`DESC`) order when not provided.

  <Expandable title="Sort">
    The available sort orders.

    <ParamField path=" ">
      * `ASC`: Sort in ascending order.
      * `DESC`: Sort in descending order.
    </ParamField>
  </Expandable>
</ParamField>

<Expandable title="Deprecated Fields">
  <ParamField path="uniqueName" type="String" deprecated>
    The Metric's unique name. If not specified, Propel will lookup the Metric by ID.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="id" type="ID" deprecated>
    The Metric's ID. If not specified, Propel will lookup the Metric by unique name.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="filters" type="[FilterInput!]" deprecated>
    The Query Filters to apply when calculating the Metric.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `filterSql` instead</span>

    <Expandable title="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"
      ```

      you could write

      ```
      {
        "column": "value",
        "operator": "GREATER_THAN",
        "value": "0",
        "and": [{
          "column": "value",
          "operator": "LESS_THAN_OR_EQUAL_TO",
          "value": "0"
        }],
        "or": [{
          "column": "status",
          "operator": "EQUALS",
          "value": "confirmed"
        }]
      }
      ```

      Note that `and` takes precedence over `or`.

      <ParamField path="column" type="String" required>
        The name of the column to filter on.
      </ParamField>

      <ParamField path="operator" type="FilterOperator" required>
        The operation to perform when comparing the column and filter values.

        <Expandable title="FilterOperator">
          The available Filter operators.

          <ParamField path=" ">
            * `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.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="value" type="String">
        The value to compare the column to.
      </ParamField>

      <ParamField path="and" type="[FilterInput!]">
        Additional filters to AND with this one. AND takes precedence over OR.
      </ParamField>

      <ParamField path="or" type="[FilterInput!]">
        Additional filters to OR with this one. AND takes precedence over OR.
      </ParamField>
    </Expandable>
  </ParamField>
</Expandable>

## DataPoolInput

<ParamField path="id" type="ID">
  The ID of the Data Pool.
</ParamField>

<ParamField path="name" type="String">
  The name of the Data Pool.
</ParamField>

## CustomMetricQueryInput

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to which this Metric belongs.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="expression" type="String" required>
  Custom expression for defining the Metric.
</ParamField>

## CountMetricQueryInput

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to which this Metric belongs.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

## SumMetricQueryInput

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to which this Metric belongs.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="measure" type="DimensionInput" required>
  The column to be summed.

  <Expandable title="DimensionInput">
    The fields for creating or modifying a Dimension.

    <ParamField path="columnName" type="String" required>
      The name of the column to create the Dimension from.
    </ParamField>
  </Expandable>
</ParamField>

## AverageMetricQueryInput

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to which this Metric belongs.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="measure" type="DimensionInput" required>
  The column to be averaged.

  <Expandable title="DimensionInput">
    The fields for creating or modifying a Dimension.

    <ParamField path="columnName" type="String" required>
      The name of the column to create the Dimension from.
    </ParamField>
  </Expandable>
</ParamField>

## MinMetricQueryInput

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to which this Metric belongs.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="measure" type="DimensionInput" required>
  The column to calculate the minimum from.

  <Expandable title="DimensionInput">
    The fields for creating or modifying a Dimension.

    <ParamField path="columnName" type="String" required>
      The name of the column to create the Dimension from.
    </ParamField>
  </Expandable>
</ParamField>

## MaxMetricQueryInput

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to which this Metric belongs.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="measure" type="DimensionInput" required>
  The column to calculate the maximum from.

  <Expandable title="DimensionInput">
    The fields for creating or modifying a Dimension.

    <ParamField path="columnName" type="String" required>
      The name of the column to create the Dimension from.
    </ParamField>
  </Expandable>
</ParamField>

## CountDistinctMetricQueryInput

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to which this Metric belongs.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="dimension" type="DimensionInput" required>
  The column to count distinct values from.

  <Expandable title="DimensionInput">
    The fields for creating or modifying a Dimension.

    <ParamField path="columnName" type="String" required>
      The name of the column to create the Dimension from.
    </ParamField>
  </Expandable>
</ParamField>

## MetricInput

<ParamField path="id" type="ID">
  The ID of a pre-configured Metric.
</ParamField>

<ParamField path="name" type="String">
  The name of a pre-configured Metric.
</ParamField>

<ParamField path="custom" type="CustomMetricQueryInput">
  An ad hoc Custom Metric.

  <Expandable title="CustomMetricQueryInput">
    <ParamField path="dataPool" type="DataPoolInput" required>
      The Data Pool to which this Metric belongs.

      <Expandable title="DataPoolInput">
        <ParamField path="id" type="ID">
          The ID of the Data Pool.
        </ParamField>

        <ParamField path="name" type="String">
          The name of the Data Pool.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="expression" type="String" required>
      Custom expression for defining the Metric.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="count" type="CountMetricQueryInput">
  An ad hoc Count Metric.

  <Expandable title="CountMetricQueryInput">
    <ParamField path="dataPool" type="DataPoolInput" required>
      The Data Pool to which this Metric belongs.

      <Expandable title="DataPoolInput">
        <ParamField path="id" type="ID">
          The ID of the Data Pool.
        </ParamField>

        <ParamField path="name" type="String">
          The name of the Data Pool.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="sum" type="SumMetricQueryInput">
  An ad hoc Sum Metric.

  <Expandable title="SumMetricQueryInput">
    <ParamField path="dataPool" type="DataPoolInput" required>
      The Data Pool to which this Metric belongs.

      <Expandable title="DataPoolInput">
        <ParamField path="id" type="ID">
          The ID of the Data Pool.
        </ParamField>

        <ParamField path="name" type="String">
          The name of the Data Pool.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="measure" type="DimensionInput" required>
      The column to be summed.

      <Expandable title="DimensionInput">
        The fields for creating or modifying a Dimension.

        <ParamField path="columnName" type="String" required>
          The name of the column to create the Dimension from.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="average" type="AverageMetricQueryInput">
  An ad hoc Average Metric.

  <Expandable title="AverageMetricQueryInput">
    <ParamField path="dataPool" type="DataPoolInput" required>
      The Data Pool to which this Metric belongs.

      <Expandable title="DataPoolInput">
        <ParamField path="id" type="ID">
          The ID of the Data Pool.
        </ParamField>

        <ParamField path="name" type="String">
          The name of the Data Pool.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="measure" type="DimensionInput" required>
      The column to be averaged.

      <Expandable title="DimensionInput">
        The fields for creating or modifying a Dimension.

        <ParamField path="columnName" type="String" required>
          The name of the column to create the Dimension from.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="min" type="MinMetricQueryInput">
  An ad hoc Min Metric.

  <Expandable title="MinMetricQueryInput">
    <ParamField path="dataPool" type="DataPoolInput" required>
      The Data Pool to which this Metric belongs.

      <Expandable title="DataPoolInput">
        <ParamField path="id" type="ID">
          The ID of the Data Pool.
        </ParamField>

        <ParamField path="name" type="String">
          The name of the Data Pool.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="measure" type="DimensionInput" required>
      The column to calculate the minimum from.

      <Expandable title="DimensionInput">
        The fields for creating or modifying a Dimension.

        <ParamField path="columnName" type="String" required>
          The name of the column to create the Dimension from.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="max" type="MaxMetricQueryInput">
  An ad hoc Max Metric.

  <Expandable title="MaxMetricQueryInput">
    <ParamField path="dataPool" type="DataPoolInput" required>
      The Data Pool to which this Metric belongs.

      <Expandable title="DataPoolInput">
        <ParamField path="id" type="ID">
          The ID of the Data Pool.
        </ParamField>

        <ParamField path="name" type="String">
          The name of the Data Pool.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="measure" type="DimensionInput" required>
      The column to calculate the maximum from.

      <Expandable title="DimensionInput">
        The fields for creating or modifying a Dimension.

        <ParamField path="columnName" type="String" required>
          The name of the column to create the Dimension from.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="countDistinct" type="CountDistinctMetricQueryInput">
  An ad hoc Count Distinct Metric.

  <Expandable title="CountDistinctMetricQueryInput">
    <ParamField path="dataPool" type="DataPoolInput" required>
      The Data Pool to which this Metric belongs.

      <Expandable title="DataPoolInput">
        <ParamField path="id" type="ID">
          The ID of the Data Pool.
        </ParamField>

        <ParamField path="name" type="String">
          The name of the Data Pool.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="dimension" type="DimensionInput" required>
      The column to count distinct values from.

      <Expandable title="DimensionInput">
        The fields for creating or modifying a Dimension.

        <ParamField path="columnName" type="String" required>
          The name of the column to create the Dimension from.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## CounterInput

The fields for querying a Metric in counter format.

A Metric's counter query returns a single value over a given time range.

<ParamField path="metric" type="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.

  <Expandable title="MetricInput">
    <ParamField path="id" type="ID">
      The ID of a pre-configured Metric.
    </ParamField>

    <ParamField path="name" type="String">
      The name of a pre-configured Metric.
    </ParamField>

    <ParamField path="custom" type="CustomMetricQueryInput">
      An ad hoc Custom Metric.

      <Expandable title="CustomMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="expression" type="String" required>
          Custom expression for defining the Metric.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="count" type="CountMetricQueryInput">
      An ad hoc Count Metric.

      <Expandable title="CountMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="sum" type="SumMetricQueryInput">
      An ad hoc Sum Metric.

      <Expandable title="SumMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be summed.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="average" type="AverageMetricQueryInput">
      An ad hoc Average Metric.

      <Expandable title="AverageMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be averaged.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="min" type="MinMetricQueryInput">
      An ad hoc Min Metric.

      <Expandable title="MinMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the minimum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="max" type="MaxMetricQueryInput">
      An ad hoc Max Metric.

      <Expandable title="MaxMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the maximum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="countDistinct" type="CountDistinctMetricQueryInput">
      An ad hoc Count Distinct Metric.

      <Expandable title="CountDistinctMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="dimension" type="DimensionInput" required>
          The column to count distinct values from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeRange" type="TimeRangeInput">
  The time range for calculating the counter.

  <Expandable title="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.

    <ParamField path="timestamp" type="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.
    </ParamField>

    <ParamField path="relative" type="RelativeTimeRange">
      The relative time period.

      <Expandable title="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.

        <ParamField path=" ">
          * `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`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="n" type="Int">
      The number of time units for the `LAST_N` relative periods.
    </ParamField>

    <ParamField path="start" type="DateTime">
      The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
    </ParamField>

    <ParamField path="stop" type="DateTime">
      The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeZone" type="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](https://en.wikipedia.org/wiki/Tz_database). Defaults to "UTC".
</ParamField>

<ParamField path="filterSql" type="String">
  The Query Filters to apply before retrieving the counter data, in the form of SQL. If no Query Filters are provided, all data is included.
</ParamField>

<Expandable title="Deprecated Fields">
  <ParamField path="metricId" type="ID" deprecated>
    The ID of the Metric to query.

    Required if `metricName` is not specified.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="metricName" type="String" deprecated>
    The name of the Metric to query.

    Required if `metricId` is not specified.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="filters" type="[FilterInput!]" deprecated>
    The Query Filters to apply before retrieving the counter data. If no Query Filters are provided, all data is included.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `filterSql` instead</span>

    <Expandable title="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"
      ```

      you could write

      ```
      {
        "column": "value",
        "operator": "GREATER_THAN",
        "value": "0",
        "and": [{
          "column": "value",
          "operator": "LESS_THAN_OR_EQUAL_TO",
          "value": "0"
        }],
        "or": [{
          "column": "status",
          "operator": "EQUALS",
          "value": "confirmed"
        }]
      }
      ```

      Note that `and` takes precedence over `or`.

      <ParamField path="column" type="String" required>
        The name of the column to filter on.
      </ParamField>

      <ParamField path="operator" type="FilterOperator" required>
        The operation to perform when comparing the column and filter values.

        <Expandable title="FilterOperator">
          The available Filter operators.

          <ParamField path=" ">
            * `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.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="value" type="String">
        The value to compare the column to.
      </ParamField>

      <ParamField path="and" type="[FilterInput!]">
        Additional filters to AND with this one. AND takes precedence over OR.
      </ParamField>

      <ParamField path="or" type="[FilterInput!]">
        Additional filters to OR with this one. AND takes precedence over OR.
      </ParamField>
    </Expandable>
  </ParamField>
</Expandable>

## TimeSeriesInput

The fields for querying a Metric in time series format.

A Metric's time series query returns the values over a given time range aggregated by a given time granularity; day, month, or year, for example.

<ParamField path="metric" type="MetricInput">
  The Metric to Query. It can be a pre-created one or it can be inlined here.

  <Expandable title="MetricInput">
    <ParamField path="id" type="ID">
      The ID of a pre-configured Metric.
    </ParamField>

    <ParamField path="name" type="String">
      The name of a pre-configured Metric.
    </ParamField>

    <ParamField path="custom" type="CustomMetricQueryInput">
      An ad hoc Custom Metric.

      <Expandable title="CustomMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="expression" type="String" required>
          Custom expression for defining the Metric.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="count" type="CountMetricQueryInput">
      An ad hoc Count Metric.

      <Expandable title="CountMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="sum" type="SumMetricQueryInput">
      An ad hoc Sum Metric.

      <Expandable title="SumMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be summed.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="average" type="AverageMetricQueryInput">
      An ad hoc Average Metric.

      <Expandable title="AverageMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be averaged.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="min" type="MinMetricQueryInput">
      An ad hoc Min Metric.

      <Expandable title="MinMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the minimum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="max" type="MaxMetricQueryInput">
      An ad hoc Max Metric.

      <Expandable title="MaxMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the maximum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="countDistinct" type="CountDistinctMetricQueryInput">
      An ad hoc Count Distinct Metric.

      <Expandable title="CountDistinctMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="dimension" type="DimensionInput" required>
          The column to count distinct values from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeRange" type="TimeRangeInput">
  The time range for calculating the time series.

  <Expandable title="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.

    <ParamField path="timestamp" type="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.
    </ParamField>

    <ParamField path="relative" type="RelativeTimeRange">
      The relative time period.

      <Expandable title="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.

        <ParamField path=" ">
          * `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`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="n" type="Int">
      The number of time units for the `LAST_N` relative periods.
    </ParamField>

    <ParamField path="start" type="DateTime">
      The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
    </ParamField>

    <ParamField path="stop" type="DateTime">
      The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeZone" type="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](https://en.wikipedia.org/wiki/Tz_database). Defaults to "UTC".
</ParamField>

<ParamField path="granularity" type="TimeSeriesGranularity" required>
  The time granularity (hour, day, month, etc.) to aggregate the Metric values by.

  <Expandable title="TimeSeriesGranularity">
    The available time series granularities. Granularities define the unit of time to aggregate the Metric data for a time series query.

    For example, if the granularity is set to `DAY`, then the the time series query will return a label and a value for each day.

    If there are no records for a given time series granularity, Propel will return the label and a value of "0" so that the time series can be properly visualized.

    <ParamField path=" ">
      * `MINUTE`: Aggregates values by minute intervals.
      * `FIVE_MINUTES`: Aggregates values by 5-minute intervals.
      * `TEN_MINUTES`: Aggregates values by 10-minute intervals.
      * `FIFTEEN_MINUTES`: Aggregates values by 15-minute intervals.
      * `HOUR`: Aggregates values by hourly intervals.
      * `DAY`: Aggregates values by daily intervals.
      * `WEEK`: Aggregates values by weekly intervals.
      * `MONTH`: Aggregates values by monthly intervals.
      * `YEAR`: Aggregates values by yearly intervals.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="filterSql" type="String">
  The Query Filters to apply before retrieving the time series data, in the form of SQL. If no Query Filters are provided, all data is included.
</ParamField>

<ParamField path="groupBy" type="[String!]">
  Columns to group by.
</ParamField>

<Expandable title="Deprecated Fields">
  <ParamField path="metricId" type="ID" deprecated>
    The ID of the Metric to query.

    Required if `metricName` is not specified.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="metricName" type="String" deprecated>
    The name of the Metric to query.

    Required if `metricId` is not specified.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="filters" type="[FilterInput!]" deprecated>
    The Query Filters to apply before retrieving the time series data. If no Query Filters are provided, all data is included.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `filterSql` instead</span>

    <Expandable title="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"
      ```

      you could write

      ```
      {
        "column": "value",
        "operator": "GREATER_THAN",
        "value": "0",
        "and": [{
          "column": "value",
          "operator": "LESS_THAN_OR_EQUAL_TO",
          "value": "0"
        }],
        "or": [{
          "column": "status",
          "operator": "EQUALS",
          "value": "confirmed"
        }]
      }
      ```

      Note that `and` takes precedence over `or`.

      <ParamField path="column" type="String" required>
        The name of the column to filter on.
      </ParamField>

      <ParamField path="operator" type="FilterOperator" required>
        The operation to perform when comparing the column and filter values.

        <Expandable title="FilterOperator">
          The available Filter operators.

          <ParamField path=" ">
            * `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.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="value" type="String">
        The value to compare the column to.
      </ParamField>

      <ParamField path="and" type="[FilterInput!]">
        Additional filters to AND with this one. AND takes precedence over OR.
      </ParamField>

      <ParamField path="or" type="[FilterInput!]">
        Additional filters to OR with this one. AND takes precedence over OR.
      </ParamField>
    </Expandable>
  </ParamField>
</Expandable>

## LeaderboardInput

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.

<ParamField path="metric" type="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.

  <Expandable title="MetricInput">
    <ParamField path="id" type="ID">
      The ID of a pre-configured Metric.
    </ParamField>

    <ParamField path="name" type="String">
      The name of a pre-configured Metric.
    </ParamField>

    <ParamField path="custom" type="CustomMetricQueryInput">
      An ad hoc Custom Metric.

      <Expandable title="CustomMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="expression" type="String" required>
          Custom expression for defining the Metric.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="count" type="CountMetricQueryInput">
      An ad hoc Count Metric.

      <Expandable title="CountMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="sum" type="SumMetricQueryInput">
      An ad hoc Sum Metric.

      <Expandable title="SumMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be summed.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="average" type="AverageMetricQueryInput">
      An ad hoc Average Metric.

      <Expandable title="AverageMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to be averaged.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="min" type="MinMetricQueryInput">
      An ad hoc Min Metric.

      <Expandable title="MinMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the minimum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="max" type="MaxMetricQueryInput">
      An ad hoc Max Metric.

      <Expandable title="MaxMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="measure" type="DimensionInput" required>
          The column to calculate the maximum from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="countDistinct" type="CountDistinctMetricQueryInput">
      An ad hoc Count Distinct Metric.

      <Expandable title="CountDistinctMetricQueryInput">
        <ParamField path="dataPool" type="DataPoolInput" required>
          The Data Pool to which this Metric belongs.

          See <a href="/docs/query-apis/api-reference/inputs#datapoolinput">DataPoolInput</a>
        </ParamField>

        <ParamField path="dimension" type="DimensionInput" required>
          The column to count distinct values from.

          See <a href="/docs/query-apis/api-reference/inputs#dimensioninput">DimensionInput</a>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeRange" type="TimeRangeInput">
  The time range for calculating the leaderboard.

  <Expandable title="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.

    <ParamField path="timestamp" type="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.
    </ParamField>

    <ParamField path="relative" type="RelativeTimeRange">
      The relative time period.

      <Expandable title="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.

        <ParamField path=" ">
          * `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`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="n" type="Int">
      The number of time units for the `LAST_N` relative periods.
    </ParamField>

    <ParamField path="start" type="DateTime">
      The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
    </ParamField>

    <ParamField path="stop" type="DateTime">
      The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeZone" type="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](https://en.wikipedia.org/wiki/Tz_database). Defaults to "UTC".
</ParamField>

<ParamField path="dimensions" type="[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.

  <Expandable title="DimensionInput">
    The fields for creating or modifying a Dimension.

    <ParamField path="columnName" type="String" required>
      The name of the column to create the Dimension from.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="sort" type="Sort">
  The sort order of the rows. It can be ascending (`ASC`) or descending (`DESC`) order. Defaults to descending (`DESC`) order when not provided.

  <Expandable title="Sort">
    The available sort orders.

    <ParamField path=" ">
      * `ASC`: Sort in ascending order.
      * `DESC`: Sort in descending order.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="rowLimit" type="Int" required>
  The number of rows to be returned. It can be a number between 1 and 1,000.
</ParamField>

<ParamField path="filterSql" type="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.
</ParamField>

<Expandable title="Deprecated Fields">
  <ParamField path="metricId" type="ID" deprecated>
    The ID of the Metric to query.

    Required if `metricName` is not specified.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="metricName" type="String" deprecated>
    The name of the Metric to query.

    Required if `metricId` is not specified.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `metric`</span>
  </ParamField>

  <ParamField path="filters" type="[FilterInput!]" deprecated>
    The Query Filters to apply before retrieving the leaderboard data. If no Query Filters are provided, all data is included.

    <span style={{ fontStyle: 'italic' }}>deprecated: Use `filterSql` instead</span>

    <Expandable title="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"
      ```

      you could write

      ```
      {
        "column": "value",
        "operator": "GREATER_THAN",
        "value": "0",
        "and": [{
          "column": "value",
          "operator": "LESS_THAN_OR_EQUAL_TO",
          "value": "0"
        }],
        "or": [{
          "column": "status",
          "operator": "EQUALS",
          "value": "confirmed"
        }]
      }
      ```

      Note that `and` takes precedence over `or`.

      <ParamField path="column" type="String" required>
        The name of the column to filter on.
      </ParamField>

      <ParamField path="operator" type="FilterOperator" required>
        The operation to perform when comparing the column and filter values.

        <Expandable title="FilterOperator">
          The available Filter operators.

          <ParamField path=" ">
            * `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.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="value" type="String">
        The value to compare the column to.
      </ParamField>

      <ParamField path="and" type="[FilterInput!]">
        Additional filters to AND with this one. AND takes precedence over OR.
      </ParamField>

      <ParamField path="or" type="[FilterInput!]">
        Additional filters to OR with this one. AND takes precedence over OR.
      </ParamField>
    </Expandable>
  </ParamField>
</Expandable>

## 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.

<ParamField path="timestamp" type="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.
</ParamField>

<ParamField path="relative" type="RelativeTimeRange">
  The relative time period.

  <Expandable title="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.

    <ParamField path=" ">
      * `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`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="n" type="Int">
  The number of time units for the `LAST_N` relative periods.
</ParamField>

<ParamField path="start" type="DateTime">
  The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
</ParamField>

<ParamField path="stop" type="DateTime">
  The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
</ParamField>

## 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"
```

you could write

```
{
  "column": "value",
  "operator": "GREATER_THAN",
  "value": "0",
  "and": [{
    "column": "value",
    "operator": "LESS_THAN_OR_EQUAL_TO",
    "value": "0"
  }],
  "or": [{
    "column": "status",
    "operator": "EQUALS",
    "value": "confirmed"
  }]
}
```

Note that `and` takes precedence over `or`.

<ParamField path="column" type="String" required>
  The name of the column to filter on.
</ParamField>

<ParamField path="operator" type="FilterOperator" required>
  The operation to perform when comparing the column and filter values.

  <Expandable title="FilterOperator">
    The available Filter operators.

    <ParamField path=" ">
      * `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.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="value" type="String">
  The value to compare the column to.
</ParamField>

<ParamField path="and" type="[FilterInput!]">
  Additional filters to AND with this one. AND takes precedence over OR.
</ParamField>

<ParamField path="or" type="[FilterInput!]">
  Additional filters to OR with this one. AND takes precedence over OR.
</ParamField>

## SqlV1Input

Input to the SqlV1 api.

<ParamField path="query" type="String" required>
  The SQL query.
</ParamField>

<ParamField path="dialect" type="SqlDialectV1">
  The SQL dialect to use. If not provided, the query is parsed on a best-effort basis.

  <Expandable title="SqlDialectV1">
    The SQL dialect to use when parsing queries.

    <ParamField path=" ">
      * `POSTGRESQL`: Parse as PostgreSQL-compatible SQL.
      * `CLICKHOUSE`: Parse as ClickHouse-compatible SQL.
    </ParamField>
  </Expandable>
</ParamField>

## DescribeSqlV1Input

Input for describing SqlV1 inputs.

<ParamField path="query" type="String" required>
  The SQL query.
</ParamField>

<ParamField path="dialect" type="SqlDialectV1">
  The SQL dialect to use. If not provided, the query is parsed on a best-effort basis.

  <Expandable title="SqlDialectV1">
    The SQL dialect to use when parsing queries.

    <ParamField path=" ">
      * `POSTGRESQL`: Parse as PostgreSQL-compatible SQL.
      * `CLICKHOUSE`: Parse as ClickHouse-compatible SQL.
    </ParamField>
  </Expandable>
</ParamField>

## RecordsByUniqueIdInput

The fields for querying records by unique ID.

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to be queried. A Data Pool ID or unique name can be provided.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="columns" type="[String!]" required>
  The columns to retrieve.
</ParamField>

<ParamField path="uniqueIds" type="[String!]" required>
  The unique IDs of the records to retrieve.
</ParamField>

## TopValuesInput

The fields for querying the top values in a given column.

<ParamField path="dataPool" type="DataPoolInput" required>
  The Data Pool to be queried. A Data Pool ID or unique name can be provided.

  <Expandable title="DataPoolInput">
    <ParamField path="id" type="ID">
      The ID of the Data Pool.
    </ParamField>

    <ParamField path="name" type="String">
      The name of the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="columnName" type="String" required>
  The column to fetch the unique values from.
</ParamField>

<ParamField path="timeRange" type="TimeRangeInput">
  The time range for calculating the top values.

  <Expandable title="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.

    <ParamField path="timestamp" type="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.
    </ParamField>

    <ParamField path="relative" type="RelativeTimeRange">
      The relative time period.

      <Expandable title="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.

        <ParamField path=" ">
          * `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`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="n" type="Int">
      The number of time units for the `LAST_N` relative periods.
    </ParamField>

    <ParamField path="start" type="DateTime">
      The optional start timestamp (inclusive). Defaults to the timestamp of the earliest record in the Data Pool.
    </ParamField>

    <ParamField path="stop" type="DateTime">
      The optional end timestamp (exclusive). Defaults to the timestamp of the latest record in the Data Pool.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="timeZone" type="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](https://en.wikipedia.org/wiki/Tz_database). Defaults to "UTC".
</ParamField>

<ParamField path="maxValues" type="Int">
  The maximum number of values to return. It can be a number between 1 and 1,000. If the parameter is omitted, default value 10 is used.
</ParamField>
