# Visualize Soracom Query Results

Visualize Soracom Query results in an interactive Lagoon dashboard.

You can visualize Soracom Query results in Soracom Lagoon 3. In this guide, we'll visualize the results that were generated in [Show Connection Trends using Query](https://docs.soracom.io/en/services/query/connection-trends).

## Prerequisites

- You must be subscribed to a Soracom Query plan. For details, see [Plan Management](https://docs.soracom.io/en/services/query/plans#plan-management).
- You must be subscribed to a Soracom Lagoon plan. For details, see [Subscribe to Lagoon](https://docs.soracom.io/en/services/lagoon/plans-and-license-packs#subscribe-to-lagoon).

## Step 1: Create a New Dashboard and Panel

1. [Sign in to the Lagoon console](https://docs.soracom.io/en/services/lagoon/configuration#signing-in-to-the-lagoon-console) and click **Dashboards icon** > **New** > **New Dashboard**.

   ![New Dashboard menu in Lagoon console](https://docs.soracom.io/_astro/create-dashboard-01.CXGL3Fy1_Z2c9GbK.webp)

   A new dashboard named "New dashboard" will be created.

2. Click **Add a new panel**.

   ![Add new panel button in dashboard](https://docs.soracom.io/_astro/create-dashboard-02.CFU8KfyM_vvo3Y.webp)

   A panel will be created and the "Edit Panel" screen will appear.

   ![Edit Panel screen interface](https://docs.soracom.io/_astro/create-dashboard-02-1.C5gI80IQ_2niqh.webp)

3. Select **Soracom Query** from the **Query** tab.

   ![Soracom Query selection in Query tab](https://docs.soracom.io/_astro/create-dashboard-with-query-01.D25e5Tfz_4QYC.webp)

4. Enter the SQL query.

   For details on the query, refer to [Create a Query with SQL Assistant](https://docs.soracom.io/en/services/query/connection-trends#step-2-create-a-query-with-sql-assistant).

   ![SQL query input field with session data query](https://docs.soracom.io/_astro/create-dashboard-with-query-02.DiM0e5Wm_1uWbkC.webp)

   > [!WARNING]
   >
   > **SQL character limit:** The maximum length for SQL queries is 3,000 characters. If your query exceeds this limit, an error will occur. Reduce the number of characters to stay within the limit.

5. Click **Run** or press Shift + Enter to execute the SQL query.

   ![Apply button to execute the query](https://docs.soracom.io/_astro/create-dashboard-with-query-07.BleQKdoa_Zzghya.webp)

   > [!WARNING]
   >
   > **API calls are counted:** When executing Soracom Query from Soracom Lagoon, API calls count toward your plan's total usage. Some plans limit the number of API calls or charge fees based on usage. For details, see [View Usage](https://docs.soracom.io/en/services/query/usage).

   > [!WARNING]
   >
   > **Time range limitation:** The time range specified in your SQL query may be limited by the time range set in the panel. For example, if your query retrieves data for the past 2 hours but the panel time range is set to 1 hour, only 1 hour of data will be displayed.

   > [!WARNING]
   >
   > **No Harvest Data export charges:** Retrieving data from Soracom Harvest Data using Soracom Query does not incur export charges. This applies even if the [Harvest Data retention period extension option](https://docs.soracom.io/en/services/harvest#retention) is enabled.

## Step 2: Set the Panel Title

By default, "Panel Title" is displayed.

1. Click **All** > **Panel options** and enter "Session Creation Count Trend for the Last 24 Hours" in the **Title** field.

   ![Panel title configuration field](https://docs.soracom.io/_astro/create-dashboard-with-query-03.D-BB3MLT_sCMDv.webp)

## Step 3: Save the Dashboard

1. Click **Apply** on the "Edit Panel" screen.

   ![Legend configuration options](https://docs.soracom.io/_astro/create-dashboard-with-query-04.DAmaOVwR_1fhU6w.webp)

   You'll return to the Dashboard screen.

2. Click the **Save dashboard** button.

   ![Save dashboard dialog](https://docs.soracom.io/_astro/create-dashboard-with-query-05.BZ_Wn2IY_Z5trlD.webp)

   The Save dashboard screen will appear.

3. Enter a name for the Dashboard (e.g., Session Creation Count Trend Dashboard) in the **Dashboard name** field and click **Save**.

   ![Final dashboard with session trend chart](https://docs.soracom.io/_astro/create-dashboard-with-query-06.CCPu5j5s_ZTLODj.webp)

   The Dashboard will be saved.
