Query Version History

Last updated May 19, 2026 ยท By the SaturnSQL team

Pro plan feature

Query version history is part of the Pro plan, currently on the waitlist. See the pricing page for plan details.

Version history turns saved queries from a single editable file into a tracked artifact. Every save is recorded with a timestamp and the editor's name, you can compare any two versions side by side, and you can roll back to an earlier version when something goes wrong.

For teams sharing a query library, this is the difference between "who changed the daily revenue query last Tuesday and why is it broken now" and "here is the diff, here is the author, here is the previous working version."

How versions are saved

A new version is recorded each time a saved query is edited and saved. The mechanics:

  • Casual edits inside an unsaved editor draft do not create versions. Hit save (or rely on auto-save for the active query), and that produces a version.
  • Each version captures the full SQL text, not just a diff, so you can always retrieve the exact query that ran at any past point.
  • Versions record who saved (the editor's name) and when (a UTC timestamp shown in your local timezone).

You do not need to do anything to opt in. As soon as you are on a Pro workspace, history starts accruing automatically.

Viewing history

Open any saved query and you will see the history panel. It lists every saved version, newest at the top, with the editor's name and the relative timestamp ("2 hours ago", "3 days ago"). Click a version to preview the SQL as it existed at that point.

Comparing versions

From the history panel, select two versions and you get a diff view. The diff highlights:

  • Lines added in the newer version (green)
  • Lines removed (red)
  • Lines changed (modified)

Common use: a scheduled query started returning unexpected numbers. Diff the last working version against the current one to see exactly what changed, and decide whether to keep the change, fix it, or roll back.

Restoring an older version

From a previous version, choose Restore. Restore does not delete the versions between then and now; it creates a brand-new version on top of the history whose contents match the older one. Nothing is lost: the intermediate versions remain in history, and you can compare or restore them later if needed.

Tip: Before restoring, add a quick note about why (in the query description or a Slack message to your team). Otherwise teammates see a sudden change and wonder where it came from.

Who can see history

History is team-wide: anyone with access to the saved query can see its version history, including who made changes. There is no private branch; the workspace is a shared source of truth. This is on purpose, the goal is shared context, not silos.

Permissions to restore a version typically follow the same rules as permissions to edit the query. Viewer-level roles can see the history but cannot make changes.

Retention

Version history is retained for as long as your team is on the Pro plan. For most teams, that means history extends well beyond any practical reach-back: months or years of edits are visible.

Specific retention windows can change over time. Check the pricing page for the current numbers, or contact us if you have specific compliance requirements.

When you would actually use this

The most common scenarios from teams using SaturnSQL:

  • A scheduled query started reporting weird numbers โ€” diff against last week's version to find the change.
  • A teammate left and you do not understand their query โ€” history shows the evolution, often making the intent clearer than the final state alone.
  • You experimented with a complex rewrite and want to back out โ€” one-click restore the previous working version.
  • Compliance asks for the SQL behind a specific metric on a past date โ€” pick the version that was current on that date.

Related help articles

Get Pro features when they launch