Writing a Query

In PopSQL, writing a query is easy, and there are a few ways to create and run your query.

Using the New Query button

Press the New Query button in the top left:

alt text

The keyboard shortcut for this is Cmd+N on macOS, or Ctrl+N on Windows/Linux.

Don't forget to name your query!

Creating a query within a folder

Right click on a folder and click New Query:

alt text

If you do this within a shared folder, your query permissions will default to Query can be viewed by your team.

Multiple statements in one query

If you have multiple statements in one query separated by a semicolon, PopSQL will run the statement where your cursor is.

To change this, click the arrow beside Run, then check Run all statements.

You can also highlight one or many statements and PopSQL only run those statements.

GIF of run statement feature

Running your query

To run your query, hit Cmd+Enter on macOS, or Ctrl+Enter on Windows/Linux, or hit the green Run button in the top right of the app.

Auto limit

By default, we'll add a limit 100 to your query so you don't accidentally run an expensive query. You can disable this by unchecking the checkbox, or by providing your own limit clause.

GIF of auto limit feature

Descriptions

You can also add a description to your query like this:

Copy Links

Copy the query link and the presentation link from the hamburger menu at the top of the query.

Query Metadata

Click the information icon under the query title and see the query owner, information about how often it's run and which dashboards it's powering.

Version control

Premium Team users have unlimited version history on their SQL queries.

Find and replace

With find and replace, you can search for a word by selecting command+F to search for a word and replace it.


Cookie settings