我正在努力取得以下成果:
https://i.stack.imgur.com/ELn79.png”rel=“nofollow noreferer”>。
合计数的计算公式(数值+1) * (1) - 1
我正试图在妇产科进行以下检查:
WITH cte AS (
SELECT date, value, ROW_NUMBER() OVER (ORDER BY date) AS seqnum
FROM table_name
), cte2 AS (
SELECT cte.date, cte.value, cte.seqnum
FROM cte
WHERE seqnum = 1
UNION ALL
SELECT cte.date, (cte.value + 1) * (cte2.value + 1) - 1, cte.seqnum
FROM cte2
JOIN cte ON cte.seqnum = cte2.seqnum + 1
)
SELECT cte2.date, cte2.value
FROM cte2;
我正在犯以下错误:
本版本中不支持复读的共同表格表述。