> For the complete documentation index, see [llms.txt](https://docs.nuvolos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nuvolos.com/reference/data-storage/build-queries.md).

# Query Builder

Nuvolos provides an easy-to-use query builder for creating and running SQL queries. Open the Query Builder by clicking a table name and selecting Query table, or by clicking the Query button next to the table name.

## Column selection

Choose which columns to include:

* Click Select all for all columns, or click individual column names.
* Selected columns appear in the Selected columns list on the right.
* Remove individual columns with the red clear button, or use Remove all to clear the selection.

{% hint style="warning" %}
At least one column must be selected in order to move to the next step!
{% endhint %}

## Filters

You can add conditions to filter the selected columns and return only rows that meet specific criteria. To add a filter, click Add filter and choose one of the selected columns. To remove a filter, click the red cross button next to it.

* FLOAT or NUMERIC - For NUMERIC and FLOAT columns, all filter types are available, including equal, not equal, greater than, and less than. You can also use the in filter to upload a file containing the values to filter by. FLOAT and NUMERIC filters can only take numbers as filtering values.
* **VARCHAR (string)** - For VARCHAR or string columns, you can use non-order-based filters such as equal and not equal, but not order-based filters such as greater than or less than.
* **DATE, TIME, DATETIME** - For date and time columns, filtering is done using date and time pickers. These allow you to select a specific date, time, or a range of dates and times.

{% hint style="info" %}
To select a past date, use the top bar of the date picker. Click the month and year displayed at the top of the calendar once to switch to month selection, then click it again to switch to year selection.
{% endhint %}

{% hint style="success" %}
Adding filters is optional, but all added filters must be valid to proceed to the next step.
{% endhint %}

## Aggregation functions

Aggregation functions let you group values in the selected columns and calculate summary results based on those groups.&#x20;

* Click **Add aggregation function** to add functions.
* Click **Add aggregation filter** to filter the aggregated results.

For example, you can group rows by the distinct values in FLOAT\_COLUMN and count how many times each value appears. You can then add an aggregation filter to return only results where the count is greater than 100.

{% hint style="success" %}
Aggregation is optional; all added aggregators and filters must be valid to proceed.
{% endhint %}

## Sort conditions

You can add one or more sorting conditions for the selected columns or for columns created by aggregation functions.

{% hint style="success" %}
Sorting is optional.
{% endhint %}

## Limit condition

The Limit condition specifies the maximum number of rows returned by the query and is required.

## Review and submit

The final step is to review the SQL query. Then:

* **Submit for data export** - executes the query and downloads the results as a zipped CSV file.
* **Run from Application** - generates a code snippet for running the query from an Application. Select the programming language.
