79321851

Date: 2025-01-01 15:33:36
Score: 1
Natty:
Report link

Can you please check the below code I tried with the sample data it was working

WITH data AS (
  SELECT
    row_num,
    step,
    conversion,
    LN(conversion) AS ln_conversion
  FROM `my_dataset.conversion_table`
)
SELECT
  row_num,
  step,
  conversion,
  -- The exponent of the cumulative sum of ln_conversion is our running product
  EXP(
    SUM(ln_conversion) OVER (
      ORDER BY row_num
      ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
    )
  ) AS total_conversion
FROM data
ORDER BY row_num;

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): Can you please
  • Low reputation (0.5):
Posted by: subho