Skip to main content
{% if data="demo_daily_orders" condition="no_rows" %}
	If Content
{% /if %}
{% else_if data="demo_daily_orders" %}
	Else If Content
{% /else_if %}

Examples

Basic Usage

{% if data="demo_daily_orders" condition="no_rows" %}
	If Content
{% /if %}
{% else_if data="demo_daily_orders" %}
	Else If Content
{% /else_if %}

Attributes

data
string
required
Table or view to query
filters
array
IDs of filters to apply to the query
condition
string
default:"has_rows"
Set to “no_rows” to render children only if the query returns no rows. Set to “has_rows” (or omit) to render if query returns rows.Allowed values:
  • no_rows
  • has_rows
where
string
Custom SQL WHERE condition to apply to the query. For date filters, use date_range instead.
having
string
Custom SQL HAVING condition to apply to the query after GROUP BY
limit
number
Maximum number of rows to return from the query. Note: When used with tables, limit will disable subtotals to prevent incomplete subtotal rows.
order
string
Column name(s) with optional direction (e.g. “column_name”, “column_name desc”)
qualify
string
Custom SQL QUALIFY condition to filter windowed results