The Web Console allows you to interact with QuestDB. It provides you with tools to query data and visualize it in a table or using graphs. In this guide, we will show you how to use it.
Accessing the Web Console
The Web Console will be available at
running locally, this will be localhost:9000.
If you are running QuestDB from Docker, make sure you publish the port
By default, the Web Console opens on the code editor.
Create a table
Re-use the following SQL statement in the editor and then press the
The editor will send the query to QuestDB and provide feedback as soon as the result is ready. The status (success/failure) as well as query timings (when relevant) will be shown in a toast notification.
To execute the query, you can also use the keyboard shortcuts
ctrl/cmd + enter
You can insert/type multiple statements in the code editor. When you press "Run" (or use a shorcut), only one statement will be executed at a time. The Console uses the cursor position to determine which statement to run. To run a particular statement, click within this statement or highlight it.
Let's insert random temperatures of 4 different places from a list. This will
simulate 4 sensors sending data. Note we have to cast the row generator cursor
int as it is of type
dateadd() requires an
Let's now run a query. You can copy annd paste the following into the editor:
You can use the mouse selection to run a subset of a query.
For example, you can highlight
SELECT ts, avg(tempC) FROM temp in the above
query and try to run it.
Building queries with the table explorer
Now that you have created a table, it will appear in the table explorer on the left-hand side. You can use this tool to explore your tables, columns, and respective types.
Add tables or columns to your query by clicking on the
add button next to the
You can run the above query again and now click on the
Chart button. This will
display the chart editor. You can then choose chart type, for example
You can download the query result by clicking the
CSV button. This file will
be useful to test the import functionality below.
Let's now take a look at the import tab. It can be accessed by clicking this icon on the left-side navigation menu:
QuestDB will automatically recognize the schema by analyzing a sample of the data you upload.
Locate the file you just downloaded in the previous step, and import it:
- Drag and drop a
txtfile into the import screen
- Use the browse file function
Alternatively, you can open the file in Excel, copy the data, and paste it in the import window.
The Web Console comes with more features such as schema editing. To find out more, consult our Web Console reference