The following SELECT statement retrieves the ExplainText for a QueryID.
.export file=explaindoc.txt; SELECT explaintextdoc FROM QryLogExplainDocV where QueryID=307199040105795996; .export reset;
The output from the SELECT statement (the ExplainTextDoc) is one long, unformatted string.