select
vc2areacode,datbegindate,
lead(c.datbegindate,1,null) over (partition by c.vc2areacode,Vc2chargetype order by c.datbegindate ) next_datbeginfee,
DATENDDATE,NUMFEEPRICE,Vc2chargetype,NUMDIRECT from ct_feerule@prod2 c where rownum<100000 order by vc2areacode,datbegindate,DATENDDATE
本文介绍了一种使用SQL进行数据检索的方法,通过一个具体的示例展示了如何从数据库中选择特定的数据记录。该查询涉及到字段如vc2areacode、datbegindate等,并利用窗口函数lead()来获取每条记录之后的日期。
2255

被折叠的 条评论
为什么被折叠?



