Sql, Spl, Database.
TradeDate) NoRisingDays FROM (SELECT TradeDate, CASE WHEN Price>LAG(price) OVER ( ORDER BY TradeDate) THEN 0 ELSE 1 END UpDownTag FROM Stock ) ) GROUP BY NoRisingDays ) SQL adopts a four-layer nested code, which is more complicated overall. This problem was once used as a recruitment test of our