---
title: "Define a Query Data Block"
slug: "define-a-query-data-block"
updated: 2026-03-03T10:26:37Z
published: 2026-03-03T10:26:37Z
---

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

# Define a Query Data Block

The Query Data block retrieves data based on a SQL query and makes it available to a grid or other visualization objects. If you are not completely familiar with writing SQL queries, you can use [Query Builder](/documentation/docs/use-the-query-builder) to build a query to access SysTrack data. You can also reuse your [Natural Language Queries](/documentation/docs/natural-language-query-builder).

Query Data blocks can be [saved to the Library](/documentation/docs/use-the-library) for others to use.

Depending on how you define a Query Data block, icons will display on the block to indicate whether the block is linked to the Library, has an external data source, or both:

| ![Diagram showing data linked to a library and querying application data.](https://cdn.document360.io/87d11426-6b1f-4b19-b593-b71e55a81af3/Images/Documentation/query_data_block_libry(1).png) | ![An external data link connects to a database for querying data.](https://cdn.document360.io/87d11426-6b1f-4b19-b593-b71e55a81af3/Images/Documentation/query_data_block_external(1).png) | ![Diagram showing library links and query data for concurrent users in a system.](https://cdn.document360.io/87d11426-6b1f-4b19-b593-b71e55a81af3/Images/Documentation/query_data_ext_libry(1).png) |
| --- | --- | --- |

To define a Query Data block:

1. From the Toolbox, drag a Query Data block onto the workspace. With the Query Data block selected, the **Object** tab on the **Properties** pane becomes active and displays configuration fields specific to the Query Data block.
2. ![SysTrack Dashboard Builder interface showing Query Data element and properties panel.](https://cdn.document360.io/87d11426-6b1f-4b19-b593-b71e55a81af3/Images/Documentation/query_define-2.png)
3. Optionally, rename the block and provide a description to help others reuse it when [saved to the Library](/documentation/docs/use-the-library).
4. In the **Query** field, enter an SQL query using any of the following options:
  - Type or paste your query.
  - Use the **Query Builder** (see [Use the Query Builder](/documentation/docs/use-nlq-queries)).
  - Select one of the Natural Language Queries (see [Use NLQ Queries](/documentation/docs/use-nlq-queries)).
5. If you need more space for your query, click the ![Diagram illustrating key concepts with highlighted sections for emphasis and clarity.](https://cdn.document360.io/87d11426-6b1f-4b19-b593-b71e55a81af3/Images/Documentation/expand_query_button-2.png) button in the top-right corner of the **Query** field. You can click it multiple times to expand the field as needed.
6. To validate the SQL statement, click Test. A message appears indicating whether the query is valid.
7. To save your changes, click **Apply**.
