Question: how to import data into excel from sql query?
Answer: In the POWER QUERY tab of the ribbon, click From Database > From SQL Server Database. In the Microsoft SQL Database popup window: Specify the Server and Database from where you want to import data using native database query. Expand the SQL Statement field and paste or enter your native database query, then click OK.