Run T-SQL in a KQL database only by prefixing the query with a -- comment line
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have a Fabric eventstream that loads data into a table named Bike_Location in a KQL database. The table contains the following columns: BikepointID - Street - Neighbourhood - No_Bikes - No_Empty_Docks - Timestamp - You need to apply transformation and filter logic to prepare the data for consumption. The solution must return data for a neighbourhood named Sands End when No_Bikes is at least 15. The results must be ordered by No_Bikes in ascending order. Solution: You use the following code segment: Does this meet the goal? - 
Community Votes
52% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
A T-SQL query inside a KQL database is only executed as T-SQL when prefixed with a '--' line; omitting it causes the query to be parsed as KQL and not meet the goal.
In a Microsoft Fabric KQL database, a query is interpreted as KQL by default. To run it as T-SQL you must begin the query with an empty T-SQL comment line (--), which tells the editor to interpret the following statements as T-SQL; without that prefix the code is treated as KQL and fails.
Writing valid T-SQL but forgetting the leading '--' comment line, so the KQL database interprets it as KQL syntax and the query does not run as intended.
Community Discussion (8 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.