No. It is running the SQLstatement directly from Excel.

These are the steps I follow to connect to SQL Server and save the query within the workbook
Data
From Other Sources
SQL Server
---Input Server Name
---Choose Table
---Click Finish
---Click Yes
---Click Properties
Name Connection
Click Definition Tab
Change command type to SQL
Change command text to your sql query