Update queries.md

Proposal of adding the toSQL method into the documentation.