【发布时间】:2019-11-12 17:23:50
【问题描述】:
Select date, symbol, open, high, low, cts.close, volume, lag(cts.close) over (PARTITION by date, symbol) as prevclose,
((cts.close - cts.open) / cts.close) * 100 as prcnt
from cts
where cts.close <> 0;
整个列 prevclose 保持为空。
【问题讨论】:
标签: sql postgresql null lag