SQL Editor

Every frame has a SQL editor, and a no-code builder for people who prefer to point and click. Both produce the same thing: a query whose result appears in the frame.

Editor Features

Write SQL directly in the frame, or click Analyze data in the frame toolbar to open the same query in a larger editor with a result preview. Either way you get:

  • Syntax highlighting for keywords, identifiers and literals.

  • Autocomplete for SQL keywords and column names.

  • Line numbers in the gutter, so error messages are easy to trace.

The Edit Query dialog in SQL mode, suggesting ship_date, ship_mode and shipping_cost after typing ship

Autocomplete suggests columns as you type

Visual Query Builder (No-Code)

If you would rather not write SQL, switch the frame to Nocode, or click Analyze data and choose Nocode. You build the query from steps, and FlowFrame writes the SQL for you.

The Edit Query dialog in Nocode mode with Columns, Summarize, Filter and Sort steps and a three-row preview

Each step you add appears as a chip at the top. Click a chip to edit that step.

Start with Columns, then use Add a step for Summarize, Filter and Sort. More holds Limit Rows and Add Tables. Remove a step with the bin icon in its header.

Columns

Every column is included by default. Click column chips to keep only the ones you need, or use Select all to go back to every column.

Summarize

Pick a function for each column you want to turn into a metric: SUM, AVG, COUNT, MIN, MAX, COUNT_DISTINCT. Give it an alias if you like. Columns left on Don't summarize are grouped automatically, so you never write a GROUP BY.

The Summarize step with profit and sales set to SUM and region and category left as group columns

Summing sales and profit by region and category

Filter

Click Add filter, then pick a column and an operator such as Equals, Contains, Is any of, Between or Is empty. Use the button next to the value to choose what you compare against:

  • Enter a value: a fixed value you type.

  • Use a parameter: a parameter node, so the filter changes when the parameter does.

  • Compare to another column: a row-by-row comparison with another column.

Summarized values appear at the bottom of the column list, so you can filter on a total as well as on raw rows.

A filter where region equals the region parameter, with the value-source menu open

Filtering on a parameter

Sort

Add one or more sorts, choose ASC or DESC for each, and use the arrows to change which sort applies first.

Limit Rows and Add Tables

These two live under More. Limit Rows caps how many rows come back. Add Tables joins another table or frame: pick the join type (only matching rows, all current rows, all new-table rows, or all rows from both) and the columns to match on.

Preview and Run

Click Run Query under Preview Result to check the output without changing the frame. When it looks right, click Save & Run. If a step is incomplete, a banner lists what to fix and Save & Run stays disabled until you do.

Note
Nocode and SQL are separate versions of the query. Switching modes does not convert one into the other, and the mode selected when you click Save & Run is the one that runs.

Running and Formatting Queries

Click the refresh button in the frame toolbar to rerun a query. For more control, select the frame, open the settings panel with the menu button at the top right, and use Actions:

  • Run Query, with a dropdown for Clear Cache & Run Query, Run All Upstream Frames and Clear Cache & Run All Upstream. Run upstream frames when a parent frame's data has changed.

  • Format query indents the SQL and puts keywords in upper case.

  • Code breakdown rewrites a long query into Common Table Expressions (CTEs) so each part is easier to read.

Ready to build with FlowFrame?
Create your free account and start building visual data workflows today.
Start Free