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

# Else If

> If prior conditional blocks do not pass, conditionally render the contents based on whether rows are returned by the query.

```liquid theme={null}
{% 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

```liquid theme={null}
{% if data="demo.daily_orders" condition="no_rows" %}
	If Content
{% /if %}
{% else_if data="demo.daily_orders" %}
	Else If Content
{% /else_if %}
```

## Attributes

<ResponseField name="data" type="string" required>
  Table or view to query
</ResponseField>

<ResponseField name="filters" type="array">
  IDs of filters to apply to the query
</ResponseField>

<ResponseField name="condition" type="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`
</ResponseField>

<ResponseField name="where" type="string">
  Custom SQL WHERE condition to apply to the query. For date filters, use date\_range instead.
</ResponseField>

<ResponseField name="having" type="string">
  Custom SQL HAVING condition to apply to the query after GROUP BY
</ResponseField>

<ResponseField name="limit" type="number">
  Maximum number of rows to return from the query. Note: When used with tables, limit will disable subtotals to prevent incomplete subtotal rows.
</ResponseField>

<ResponseField name="order" type="string">
  Column name(s) with optional direction (e.g. "column\_name", "column\_name desc")
</ResponseField>

<ResponseField name="qualify" type="string">
  Custom SQL QUALIFY condition to filter windowed results
</ResponseField>
