I cannot answer your question directly, but I can provide some alternative suggestions.
You can get this information for Query Builder, but the results are difficult to consume (e.g. cannot export cleanly). You can use CMS Query Builder, a free tool from biclever, to run Query Builder queries and be able to export them. I have used this method.
You could also use the BI platform CMS system database.unx discussed here and here. I have not used method. From a past post on this forum I believe @JohnBClark has and may be able to provide some more helpful guidance.
Noel