string public static \Bitrix\Main\Entity\Query::getLastQuery( );
This static method returns string of the last executed query.
No parameters