The SQL Viewtool can be used for READ ONLY queries to a configured database(s).
The following example shows how the SQL tool is mapped in the toolbox.xml
file:
<tool>
<key>sql</key>
<scope>request</scope>
<class>com.dotcms.rendering.velocity.viewtools.SQLResultsViewTool</class>
</tool>
For complete information on usage of the SQL tool, please see the Executing a SQL Query documentation.