Get started with Atlassian Analytics
Learn how to add Atlassian Analytics to a site and understand what you need to query data and create charts.
Visual SQL steps help you transform your data and get it to the format you need for your charts. After running your initial query (which is always the first Visual SQL step), you can add (then modify) more Visual SQL steps.
New Visual SQL steps are added under the currently selected step in Visual SQL. So if you want the new step to be the last step, make sure you select the last step before adding the new one. You can add as many steps as you’d like, in any order. You can also use each step multiple times as needed.
Some steps even allow you to add custom transformations using our built-in formulas and SQLite syntax.
Learn more about the available Visual SQL steps.
Steps are applied in order from first to last, so in some cases, it’s possible for a later step to override an earlier one.
To make changes to a Visual SQL step or remove it altogether:
Hover over or select the step you want to edit.
Select the Edit step ().
Apply your changes.
Select Run query for queries or Save for the other Visual SQL steps.
Alternatively, you can double-click on a step to edit it.
To remove a Visual SQL step:
Hover over or select the step you want to remove.
Select Remove step ().
Removing a query step from Visual SQL also removes any transformation steps applied to it.
To reorder Visual SQL steps, do the following:
Select and hold the step that you want to move.
Drag it to the target location. You’ll see a blue line to indicate where the step will be placed once you let go.
Edit other steps as needed. Be aware of reordering steps involving renamed or hidden columns—it might cause your chart to break.
Quickly undo or redo Visual SQL steps and other changes by selecting Undo () or Redo (), respectively.
Maybe you accidentally removed a step. No problem—just undo the deletion to quickly restore it!
Note that undo and redo applies to all changes you make to a chart, including updated chart settings. You can even keep selecting Undo to go all the way back to the initial state of your chart in your current session.
To undo, try using Command + Z (Mac) or Control + Z. To redo, try using Command + Y (Mac) or Control + Y or Control + Shift + Z.
To copy and paste a Visual SQL step:
Hover over or select the step you want to copy.
Select Copy step (). If you want to copy a query, select Copy steps. Copying a query includes all the transformation steps applied to that query.
Hover over or select the step to paste the copied step after.
Select Paste step after this step ().
If you prefer keyboard shortcuts, you can use:
Command + C (Mac) or Control + C to copy
Command + V (Mac) or Control + V to paste
To cut and paste a Visual SQL step:
Select the step you want to cut.
Use Command + X (Mac) or Control + X to cut. Cutting a query includes all the transformation steps applied to that query.
Select the step to paste the copied step after.
Use Command + V (Mac) or Control + V to paste.
To preview your data at any point in your Visual SQL steps, select the step and you’ll see its result set shown in the result table. It can be incredibly useful to compare how your data looks before and after a transformation step is applied.
Was this helpful?