To edit an existing SQL query:
Step 1. Select SQL Database input block.
Step 2. Select the “SQL Query (input)” tab and click on the “Edit SQL” button.
“Edit SQL Statement” dialog will appear. Type a new query definition or modify the existing query and click “OK”.