How to get the SQL expression for a \Magento\Framework\DB\Select or \Zend_Db_Select instance

Use the assemble() or the magic __toString() method, or (string) expression (which is the same as __toString() call).


See also: