The other readouts show the code with indentation to make it easier to read. Whitespace isn't syntactic in SQL, so you could do:

```
            'SELECT engdoc.slug, engdoc.title, '
            'dashboards_wikidocumentvisits.visits, '
            'count(engrev.document_id) '
            'FROM wiki_document engdoc '
            'LEFT JOIN dashboards_wikidocumentvisits ON '
            '    engdoc.id=dashboards_wikidocumentvisits.document_id '
            '    AND dashboards_wikidocumentvisits.period=%s '
            'LEFT JOIN wiki_revision engrev ON '
            '    engrev.document_id=engdoc.id '
            '    AND engrev.reviewed IS NULL '
            '    AND engrev.id>engdoc.current_revision_id '
            + extra_joins +
            'WHERE engdoc.locale=%s AND '
            '    engdoc.is_template AND '
            '    NOT engdoc.is_archived '
            'GROUP BY engdoc.id '
            'ORDER BY dashboards_wikidocumentvisits.visits DESC, '
            'engdoc.title ASC' + self._limit_clause(max)) 
```

That's a little easier to read and should work with auto-indent in editors if you're using that.