# Testing SQL Query Databoxes

This is best shown in an example. Once your SQL is crafted and appropriate Expressions have been added, click the **Test** button. As the description says, this query will return all columns from an Asset table. A number of Expressions will test or retrieve the returned data.

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2Fenpj1XYHPKSGu4PosfWZ%2F2023-06-26_09h59_03.png?alt=media&#x26;token=393f9e6a-f5ff-45e8-afb9-98912cbbad85" alt=""><figcaption><p>Extracting data (here, from an external database connection)</p></figcaption></figure>

This will present a dialogue as shown below. In this example, you can see the DataBox **Import.AssetID** needs to be supplied; you should enter any test values and click **Evaluate**. In this case, **100** has been entered and in the **Results** section you can see the full result (which is provided in the form of an XML snippet) and the accompanying results of the Expressions:&#x20;

<figure><img src="https://2882349412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MARm6St_qFGM52R3pBa%2Fuploads%2FSyMt8olBFYJUPUHW66uK%2F2023-06-26_10h04_09.png?alt=media&#x26;token=88d441b0-1863-4f7f-ab0d-a7807fdfdb45" alt=""><figcaption><p>Testing your SQL query</p></figcaption></figure>

{% hint style="info" %}
Caution: it is important that your SQL queries return a single row of data - [read more here](https://docs.keyfax.biz/product-suite/admin/entities/databoxes/sql-query/..#multiple-rows-of-data).
{% endhint %}
