Write, autocomplete, and run queries; then read, filter, chart, and export the results.
The query editor is where you write and run queries against any connected database: SQL for PostgreSQL, MySQL, and SQLite; shell-style queries for MongoDB; and commands for Redis.
Click + in the tab bar and choose New Query, or use the query icon in the sidebar. The editor knows which connection and database the tab targets, shown in the footer.
Press Cmd/Ctrl + Enter (or the Run button) to execute. Results stream into the grid below and large results paginate. The result grid is the same one used for table browsing, so you can sort, filter, and inspect a cell just like a table.
Cancellable. A long-running query can be stopped; the Run button becomes Stop while it executes.
Saved queries - name and save a query, organize saved queries into folders, and reopen them later. Save with Cmd/Ctrl + S or the Save action in the editor.
Run history - every query you run is logged automatically, separate from saved queries, with its status, duration, rows affected, and timestamp. Open the history view (grouped by date) to copy, re-run, or reopen a past query.