When making queries I usually need to add a ‘totals’ row to the result, which I do with a UNION ALL. This ‘totals’ row is very useful for the table view, but not so much for the charts, since the ‘totals’ is not an actual data point. So I can’t render charts from this query. To circumvent this I create a second query with exactly the same code, but without the UNION ALL clause, to make the charts from that 2nd query.
Ideally I would want to use one query for both the table and the charts. Filtering or excluding rows from the result to create a graph would be very handy for this use case.