Saved queries

Keep a query in the shared library so several reports can pin it.

A saved query is a named query in the library. Use it when the same question appears on more than one report. A query used only once belongs on its report as a widget instead.

Before you start: saving, changing and deleting saved queries needs Full control on Analytics & reports. Everyone with access can open and run them.

Save a query

  1. In the Query workspace write and run the query.
  2. Type a name in Query name.
  3. Click Save query. You see "Query saved" and the label Saved appears. Click Update saved query to save later changes.

When you build a widget for a report, saving is optional: use Also save as query.

Find and reuse

  1. Open Analytics & Reports › Saved queries. Each card shows the name, a badge for how it is shown (Auto, Table, Bar chart, Line chart, Donut or Metric) and the date it changed.
  2. Click a card to open it in the workspace.
  3. Right-click a card for Open, Open in new tab, Copy SQL and Delete.
  4. To use it on a report: in edit mode choose Add widget › Saved query, pick it, and choose Show it as a chart, headline number or table.

Delete

Click the cross on a card or right-click › Delete. Delete this saved query? warns that reports with a widget pinned to it will show an empty widget. Fix those reports first, or re-pin another query.

Tips

  • Saved queries always run on your workspace data. A query written against another data source cannot be saved.
  • A pinned widget updates when the saved query changes.
  • An empty library shows No saved queries with a New query button.