Query editor
WITH events as (SELECTt."from" as user,- CAST(value AS DOUBLE) AS amountFROMerc20_ethereum.evt_Transfer AS tWHEREt.contract_address = {{curve_pool}}and "to" not in ( {{yearn_pool}}, {{curve_gauge}} ))SELECTuser,amount,SUM(amount) OVER(ORDER BY amount DESC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "Cumulative amount",ROW_NUMBER() OVER (ORDER BY amount DESC) as rowFROM (SELECTuser,SUM( amount/1e18 ) as amountFROM eventsGROUP BY 1ORDER by 2 DESC)ORDER BY amount DESC