Saved queries
Name, tag, and organize the queries you run again and again.
For: analysts and developers.
A saved query is a query you've decided to keep. It has a name, an optional description, tags for search, and lives in a folder you control.
Open the saved queries panel
| Way to open | Where |
|---|---|
| Sidebar | Saved Queries section under a connection |
| Command palette | Cmd+K, type "saved" or part of a query name |
| Menu | View → Show Saved Queries |
Saved queries are scoped to a connection. The same SQL can be saved against staging and production as two entries if you want clear separation.
Save the query in your editor
While a tab has the SQL you want to keep:
Cmd+S(or right-click →Save Query...)- Give it a name. Required.
- Optionally add a description and tags.
- Pick a folder, or leave it at the root.
- Save.
The tab title now shows the saved name. Future Cmd+S updates the saved version. To save a copy under a new name, choose File → Save As....
Run a saved query
Double-click in the panel to open it in a new tab against the same connection. Cmd+Return runs.
To run without opening the editor, right-click → Run and the result appears in a floating window. Useful for one-off checks where you don't need to edit.
Organize
Folders, tags, and search work together:
- Folders group related queries:
Onboarding,Billing,Support. - Tags cross-cut folders:
daily,report,admin-only. - Search the panel by name, tag, description, or SQL content.
A query can live in one folder but carry many tags. The panel has a tag filter at the top — click a tag to see only queries with that tag.
Cross-connection queries
To use the same query against several connections (e.g., a health check you want to run on production and staging), right-click the query and choose Link to another connection.... Pick the target connection. The query now appears under both, edits to one reflect in the other.
Sharing saved queries
There is no built-in sharing yet. Two workable approaches today:
- Export to a file: right-click →
Export to .sql. Send the file to a teammate. - Notebooks: if you want to share a query alongside its context, put it in a notebook and export to HTML or PDF.
Versioning
Saved queries don't keep an internal history. If you make a change you regret, the original is in query history — every execution is logged separately from the saved file.
Storage and sync
Saved queries are stored as files on your Mac under ~/Library/Application Support/QueryDeck/queries/. They are not synced to the cloud. To back up:
- Add
~/Library/Application Support/QueryDeck/queries/to Time Machine, Arq, or Backblaze. - Or copy the folder into a personal Git repo.
We're considering Git-backed sync in a future release. Vote on it via the in-app feedback button.
What's next
- Query history for queries you didn't think to save at the time
- Snippets for reusable blocks
- Notebooks for documenting a query alongside its result