SQL Blocks


In query.me Notebooks, all SQL queries are run in SQL blocks. These blocks offer you a wide range of functionalities to make your work as fast and seamless as possible. Below, you'll find an overview of them including some small examples.

Create & Run

To create a new SQL block, either click on the + button and select SQL block or type the shortcut -- +space in an empty text block.

Connecting to a DB

To connect your SQL Block to a database, click on the database icon at the top left of your new block and select the wanted database. If you haven't added a database to your workspace yet, please check out our guide about how to do so here.

Adding names to your queries

Short, understandable names for your queries can not only make your notebook easier to read but will also help you to find them more easily at a later point (via the Document tab for example). To give them a name, click right of the database icon at the top left of your SQL block.

Setting a default LIMIT

By default, new SQL-Blocks have a LIMIT of 1000 displayed rows in query.me. To change this, type your wanted LIMIT into your query just like you normally would (this will overwrite the default LIMIT) or use the LIMIT-field at the bottom right of your block. There, you have the option to choose between a selection of the most commonly used LIMITs, type in a custom LIMIT or disable the default LIMIT overall (to fetch all available rows). To enable/disable the LIMIT, click on the checkbox next to the LIMIT input field.

Running your queries

To run a query click on the -button on the left side of the block.

Running only a part of your SQL

To run only a specific part of your query, simply select the part that you want to run and click (This can help wonders when you're trying to debug something!)

Download query results as CSV (TODO)

Sometimes you will need to have your analysis results available in other file-formats (to import them into a spreadsheet e.g.).
To enable you to import your analysis results into spreadsheets or other analysis tools of your choice, you can export them to .csv in query.me. To do so, just click on the download icon which is located at the top right of your results panel.

Hiding Queries or Results

To make your notebooks look even cleaner, you have the option to hide both your queries as well as their results. To do so, click on the eye-icon at the top right of the respective block. If you want to see them again, just click on it again.

Results History

See the tabs below the query results? The results of your queries are automatically cached for some time (currently 30 days), so you can easily go back and forth between query runs and compare results.

Jump to