Skip to main content
Saved queries let you store and share frequently used SQL expressions. They are scoped to your organization.

List saved queries

Pass --json for machine-readable output:
Example output:

Get a saved query

Print the full details of a saved query by name:
To print only the SQL (useful for piping into oleander query):
Example - run a saved query directly:
To write its results to a table instead of printing them, send the same SQL to oleander query submit:
oleander queries save stores the SQL text under a name. oleander query submit --destination writes the result set to a table. They are different things.
Pass --json to get the raw JSON response:

Save a query

If a query with the same name exists it is replaced. Example: