You maybe able to get what you are looking for via the dashboard serviceability menu.
Click on the visualization in the dashboard and then click CTRL+.
Within the available menu, click the fetch SQL to obtain and view the SQL.