🗣️📊 SwiftQuery AI now lets you ask questions with natural language, or easily drag + drop →

View and edit SQL for any visual query or natural language question

See SQL any way you create a question

Zing has always made it easy not just to get a graph, but to be confident that the results are accurate with fully editable graphs (SwiftQuery). 

We’ve also had the ability to create queries using SQL, complete with a typeahead of fields and functions.

Today, we’re making it so you can see and edit the SQL for a question even if it was created with natural language or visually using SwiftQuery. This is helpful for:

  • Understanding how the query was constructed and gaining confidence that it is correct
  • Learning SQL since you can easily see the SQL created ‘behind’ a graph or natural language question

Viewing / editing SQL for a question

One you ask a question with natural language or visually, just tap the three dots in the upper right and then click ‘SQL Editor’ to bring up panel showing the SQL that Zing generated for the query.

Step-by-step

Zing lets you ask questions in three ways:

  • Visually, using the SwiftQuery drag+drop builder
  • With natural language, harnessing the power of leading edge OpenAI and Google Gemini models
  • With SQL, using a typeahead and in-line validation to help you get a runnable query quickly

With this new feature, you can view the SQL and make edits to it for more complex queries which are not supported through visual querying, or you can take the SQL results to another tool such as for running a data pipeline.

Zing’s SQL editor shows color-coding for functions, values, and field names so its easy to parse the different parts of the SQL that has been generated.

You’ll notice that Zing generates SQL that applies limits (to speed up query results) and applies windowing functions (where appropriate) to make for a more understandable display of the data. 

You can of course overwrite these if you’d like, but viewing this full SQL provides insight into how Zing is optimizing your questions to run quickly and display relevant results.

One note: If you edit the SQL generated for a natural language or visually-created question, the question will not be visually editable anymore and future edits to that question will have to occur via SQL. This is because not all SQL a user manually enters can be rendered in the visual builder.

Get started for free! Sign In or create a new account. 

Related articles

Download Zing For Free

Available on iOS, Android, and the web

Learn how Zing can help you and your organization collaborate with data

Schedule Demo