//Metadata: //Programming language: Power Query M //Natural language: English //Output: native query in a table //Explanation: //this code generates a native query in a table. //the code works for a SQL Server data source. Other sources such as DataBricks SQL are working slightly different. //How to use: //copy the code into an empty query let​ Source = Sql.Database( "ContosoRetailDW.database.windows.net, //Database URL "Demo", //Database [Query = „SELECT //Begin of SQL query * //Columns FROM DataModel.Customer //Table WHERE City IS Tokyo //Simple filter WHERE City IN (" & Text.Combine(ListCities, ",")&") //Alternative filter working with a list of values "] ) in Source