sql进阶:求某个日期的连续上涨天数

45 阅读1分钟

Sql

一、案例分析

表中有某个日期列和某个数值列,给定某个日期,求这个日期往前推数值的连续上涨天数
eg:

create table test_zhu(code varchar2(100),stockdate date,close double);
insert into test_zhu values</