Skip to content

SQL Editor

PondPilot’s SQL editor is built for productivity with syntax highlighting, intelligent autocomplete, and full DuckDB SQL support.

The editor provides full SQL syntax highlighting powered by CodeMirror:

  • Keywords (SELECT, FROM, WHERE, etc.)
  • Functions (COUNT, SUM, AVG, etc.)
  • Strings, numbers, and comments
  • Table and column references

Start typing to get intelligent suggestions:

  • Table names from your data sources
  • Column names based on context
  • DuckDB functions with signatures
  • Keywords and SQL clauses

Press Tab or Enter to accept a suggestion.

Hover over any DuckDB function to see:

  • Function signature
  • Parameter descriptions
  • Return type
  • Example usage

Press Ctrl+Enter (or ⌘+Enter on Mac) to execute all statements in your script.

Multiple statements are executed in order:

-- All three statements run sequentially
CREATE TABLE temp AS SELECT * FROM data;
UPDATE temp SET status = 'processed';
SELECT * FROM temp;

Press Ctrl+Shift+Enter to execute only the statement where your cursor is positioned.

This is useful for:

  • Testing individual queries in a larger script
  • Re-running a specific statement
  • Debugging step by step

After running a query:

  • Success - Results appear in the table below
  • Error - Error message with line number and details
  • Timing - Execution duration displayed

Results display in an interactive table:

FeatureDescription
SortClick column headers
FilterFilter by column values
PaginateNavigate large result sets
CopySelect and copy cells
ResizeDrag column borders

NULL values are clearly indicated with a distinct style, making them easy to distinguish from empty strings.

Column headers show the data type:

name (VARCHAR) | age (INTEGER) | created_at (TIMESTAMP)

Customize the editor font in Settings → Appearance:

  • Font size - Adjust text size
  • Font weight - Light, regular, semibold, or bold

Enable automatic SQL formatting when executing queries:

  1. Open Settings → Appearance
  2. Toggle “Format on Run”

When enabled, your SQL is automatically formatted before execution.

Create new scripts using:

  • Ctrl+K → “New SQL Script”
  • Click the + button in the tab bar
  • Spotlight → type a name for your script

Click the script name in the tab to rename it. Scripts are auto-saved with their names.

Scripts are automatically saved to your browser’s IndexedDB:

  • Persistent - Scripts survive browser restarts
  • Automatic - No manual save needed
  • Per-browser - Scripts are specific to your browser profile

Import existing .sql files:

  1. Press Ctrl+I or Spotlight → “Import SQL Files”
  2. Select one or more .sql files
  3. Each file opens as a new script tab

Export all your scripts as a ZIP archive:

  1. Open Settings → Saved Data
  2. Click “Export All Queries”
  3. Download the ZIP file
  • Multiple tabs - Work on multiple scripts simultaneously
  • Reorder - Drag tabs to rearrange
  • Close - Click the X or middle-click
  • Close others - Right-click → “Close Other Tabs”
Tab TypeIconDescription
Script📝SQL query editor
Table📊Data source preview
Comparison⚖️Data comparison results

Errors are highlighted with:

  • Red underline on the problematic code
  • Error message with line number
  • Suggested fix (when available)
ErrorCauseSolution
Table not foundTable doesn’t exist or isn’t loadedCheck Data Explorer for available tables
Column not foundTypo or wrong tableUse autocomplete for column names
Syntax errorInvalid SQLCheck DuckDB documentation

PondPilot uses DuckDB, which supports standard SQL plus many extensions:

-- Read files directly
SELECT * FROM read_csv('file.csv');
SELECT * FROM read_parquet('file.parquet');
SELECT * FROM read_json('file.json');
-- Export results
COPY (SELECT * FROM data) TO 'output.parquet';
-- Describe tables
DESCRIBE my_table;
SHOW TABLES;
-- String functions
SELECT string_agg(name, ', ') FROM users;
-- Window functions
SELECT *, ROW_NUMBER() OVER (PARTITION BY category) FROM sales;

PondPilot includes common DuckDB extensions:

  • parquet - Parquet file support
  • json - JSON functions
  • excel - Excel file reading

For complete DuckDB SQL reference, see DuckDB Documentation.