> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Version History

> Queries have a version history, where you can compare and revert to previous query versions.

All queries come with version history, where you can compare and revert to previous query versions seamlessly. **You can access version history from the query editor toolbar.**

<div
  style={{
position: "relative",
paddingBottom: "calc(56.4583% + 41px)",
height: 0,
width: "100%"
}}
>
  <iframe
    src="https://demo.arcade.software/2jyDGnCcVWVwxVea3M1t?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    title="View Version History of a Query"
    frameBorder={0}
    loading="lazy"
    webkitallowfullscreen=""
    mozallowfullscreen=""
    allowFullScreen=""
    allow="clipboard-write"
    style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
  />
</div>

<Note>
  **History Length**

  Everyone gets 30 days by default, you can upgrade your plan for longer history access.
</Note>

### Saving and Managing Versions

A new version is created each time you save or run your query. The first time you save a query — whether it is forked or freshly created — an initial version is committed to the history. If you've forked a query, the version history starts fresh; you won't have access to the original query's edit history.

Each subsequent run saves a new version automatically. If you leave the page without saving or running, any unsaved changes will be lost. You can also edit the metadata of any saved version — such as adding a title or description — to make it easier to identify later.

<div
  style={{
position: "relative",
paddingBottom: "calc(56.4583% + 41px)",
height: 0,
width: "100%"
}}
>
  <iframe
    src="https://demo.arcade.software/Ni58BC9VSh4B62wERYUF?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    title="Edit Metadata for a Saved Query Version"
    frameBorder={0}
    loading="lazy"
    webkitallowfullscreen=""
    mozallowfullscreen=""
    allowFullScreen=""
    allow="clipboard-write"
    style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
  />
</div>

### Comparing and Reverting Versions

You can compare diffs between any two versions to see exactly what changed, and revert to a previous version if needed. **The reverted query is saved as a new version in the history**, so you never lose your current work.

<div
  style={{
position: "relative",
paddingBottom: "calc(56.4583% + 41px)",
height: 0,
width: "100%"
}}
>
  <iframe
    src="https://demo.arcade.software/nMwDDkhGgFOweetiOOLr?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    title="Compare Changes Between Query Versions"
    frameBorder={0}
    loading="lazy"
    webkitallowfullscreen=""
    mozallowfullscreen=""
    allowFullScreen=""
    allow="clipboard-write"
    style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
  />
</div>
