> For the complete documentation index, see [llms.txt](https://docs.getinfinity.app/user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getinfinity.app/user-guide/comprehensive-user-guide/2.-charts/creating-charts/data-explorer.md).

# Data Explorer

The **Data Explorer** in Infinity provides an advanced SQL-based interface for users who prefer to manually query datasets, customize visualizations, and leverage AI assistance for SQL generation. Follow these steps to build and analyze data using SQL.

***

### **Step 1: Access the Data Explorer**

1. Click on **"Data Explore"** from the left sidebar.

💡 *This opens the SQL based Data Explorer, where you can write queries and explore data.*

<figure><img src="/files/ltGikwGkjNi2rshFsEEQ" alt=""><figcaption></figcaption></figure>

***

### **Step 2: Add a New Query**

1. Click **"Add New Query"** to create a new query workspace.
2. A new query editor box will appear.

📌 *Each query box is independent, allowing multiple datasets to be built simultaneously.*

<figure><img src="/files/XCuKnctaCZcyaqb1Cz4V" alt=""><figcaption></figcaption></figure>

***

### **Step 3: Select the Relevant Data Source**

1. Choose the appropriate **database or uploaded dataset** from the available options.

🔍 *Ensure you select the correct source before running queries to avoid errors.*

<figure><img src="/files/67qwownAa5dhzteIsv3E" alt=""><figcaption></figcaption></figure>

***

### **Step 4: Write the SQL Query to Build a Dataset**

1. In the query editor, enter your SQL query.
   * Example:

     ```sql
      SELECT sales, orderdate FROM orders;
     ```
2. Modify the query based on the dataset requirements.

🛠️ *This step allows full control over how the dataset is structured.*

<figure><img src="/files/e5BjPIDgRCsFAyweEoMS" alt=""><figcaption></figcaption></figure>

***

### **Step 5: Click "EXECUTE" to Run the Query**

1. Once the query is written, click **"EXECUTE"** to run it.
2. The results will be displayed in a table format below the query box.

📊 *Executing the query fetches the relevant data for visualization.*

<figure><img src="/files/qdII5WD7nALyOuht00Rp" alt=""><figcaption></figcaption></figure>

***

### **Step 6: Use AI Bot for SQL Assistance**

1. Click on the **AI Bot** feature to get SQL assistance.
2. AI can **suggest, auto-fix, or optimize** your SQL query.

🔹 *Helpful for users who are unsure about SQL syntax or need optimization suggestions.*\
![](/files/cEkZoxlqIoS256J40G4V)

***

### **Step 7: Automatically Fix Query Syntax Errors**

1. If your query has errors, AI will suggest corrections.
2. Click **"Apply Fix"** to correct syntax issues automatically.

🛠️ *This ensures that queries run without manual troubleshooting.*<br>

<figure><img src="/files/ogsyfkHTb9qzDoOAkXuS" alt=""><figcaption></figcaption></figure>

***

### **Step 8: Click "EXECUTE" Again**

1. If the query was fixed or modified, click **"EXECUTE"** again to retrieve updated results.

🔄 *Re-executing the query applies changes and fetches fresh data.*

<figure><img src="/files/ftjg29ErcZpR9zdmzhkW" alt=""><figcaption></figcaption></figure>

***

### **Step 9: Use AI to Generate a Visualization from the Dataset**

1. Click on **"Visualization"** to let AI suggest a suitable chart for the dataset.
2. The system will automatically determine the best **chart type, layout, and formatting**.

📌 *AI-driven visualizations help quickly convert raw data into meaningful insights.*<br>

<figure><img src="/files/HvMe7Fph2utwjBX6sBCC" alt=""><figcaption></figcaption></figure>

***

### **Step 10: Customize the Table and Chart**

1. Click **"Customize the Table"** to manually format/create the chart.
2. The user will be taken to the chart customization page.

🎨 *This step allows users to create and refine the chart before saving it.*

<figure><img src="/files/A1xjz391M9alQxxGByHv" alt=""><figcaption></figcaption></figure>

***

### **Final Step: Save the Chart**

1. Once the visualization is complete, click **"Save"** to store it.
2. The chart will be available in your **feed**.

💾 *Your SQL-powered chart is now ready for sharing and further analysis!*

***

### **Next Steps**

For more advanced customization, refer to the [**Chart Customization Guide**](/user-guide/comprehensive-user-guide/2.-charts/chart-customization.md) to explore:

* **Using interactive filters and drill-downs**.
* **Applying custom themes and layouts**.
* **Integrating AI-powered insights into reports**.

The **Data Explorer** in Infinity provides **full SQL control, AI assistance, and powerful visualization tools**, making it an ideal solution for **data analysts, engineers, and SQL-savvy users**. 🚀
