
Ultimate access to all questions.
You are tasked with transforming data using Azure Stream Analytics to analyze real-time stock trade data. The data includes fields such as 'TradeID', 'StockSymbol', 'TradePrice', and 'TradeTime'. You need to calculate the average trade price for each stock symbol over a sliding 5-minute window. Which Stream Analytics query would you use to achieve this, considering the need for real-time processing and accuracy?
A
SELECT StockSymbol, AVG(TradePrice) AS AvgPrice FROM Input TIMESTAMP BY TradeTime GROUP BY StockSymbol, SlidingWindow(minute, 5);
B
SELECT StockSymbol, SUM(TradePrice) AS TotalPrice FROM Input TIMESTAMP BY TradeTime GROUP BY StockSymbol, TumblingWindow(minute, 5);
C
SELECT StockSymbol, AVG(TradePrice) AS AvgPrice FROM Input GROUP BY StockSymbol, HoppingWindow(minute, 5);
D
SELECT StockSymbol, AVG(TradePrice) AS AvgPrice FROM Input TIMESTAMP BY TradeTime GROUP BY StockSymbol, TumblingWindow(minute, 5);