Why are you looking for a SQL query, when there is an option to directly add the table using Smartlist? Smartlist has got the inbuilt export to excel option.
If you are looking for a SQL query to export to data to excel. It can also be done using the SQL query.