<prompt> Kutokana na meza ya bei ya hisa na nguzo StockID, Tarehe, na Bei, kuandika SQL query kupata ndefu mfululizo wa siku ambapo bei ya hisa imeongezeka, kwa kila hisa.  <response>: One possible solution can be:SELECT StockID, MAXrun AS longest_streak FROM SELECT StockID, Date, Price, ROW_NUMBER OVER PARTITION BY StockID ORDER BY Date AS row_num, ROW_NUMBER OVER PARTITION BY StockID, Price ORDER BY Date - ROW_NUMBER OVER PARTITION BY StockID ORDER BY Date AS run FROM stock_prices aGROUP BY StockID, runHAVING MINPrice MAXPriceORDER BY StockID, longest_streak DESC;This query uses three window functions to identify streaks of increasing stock prices: - ROW_NUMBER assigns a row number to each pricedate combination, grouping by StockID.- ROW_NUMBER assigns a row number to each pricedate combination that has the same StockID and Price, grouping by Date in ascending order. This effectively assigns a group ID to each run of consecutive dates where the price remains the same.- Subtracting these row numbers gives a unique identifier for each streak of consecutive dates where the price increases. Then, we group by StockID and the streak identifier run, and count the length of each streak with MAXrun. We filter out streaks where the price never changes with HAVING MINPrice MAXPrice, and finally order by StockID and the length of the longest streak of increasing prices to get the desired result. 