Query editor
--Error: Query is too long for wand tools.--Try shortening query to try again./* Error: Query is too long for wand tools. *//* Try shortening query to try again. *//* Error: Query is too long for wand tools. *//* Try shortening query to try again. *//* ts.total_supply-a."$MIST_on_LP"-m.mist10-mi.mist15 as circulating */WITH total_supply AS (SELECTday,SUM(transfer) OVER (ORDER BY day) AS total_supplyFROM (SELECTDATE_TRUNC('day', evt_block_time) AS day,SUM(ROUND(value / TRY_CAST(1000000000000000000 AS DOUBLE))) AS transferFROM erc20_ethereum.evt_TransferWHEREcontract_address = 0x88acdd2a6425c3faae4bc9650fd7e27e0bebb7ab /* MIST contract address */AND "from" = 0x0000000000000000000000000000000000000000GROUP BY1) AS net), days AS (SELECTdayFROM UNNEST(SEQUENCE(TRY_CAST('2020-11-06' AS TIMESTAMP),CAST(TRY_CAST(TRY_CAST(TRY_CAST(TRY_CAST(TRY_CAST(DATE_TRUNC('day', CURRENT_TIMESTAMP) AS TIMESTAMP) AS TIMESTAMP) AS TIMESTAMP) AS TIMESTAMP) AS TIMESTAMP) AS TIMESTAMP),INTERVAL '1' day) /* WARNING: Check out the docs for example of time series generation: https://dune.com/docs/query/syntax-differences/ *//* WARNING: Check out the docs for example of time series generation: https://dune.com/docs/query/syntax-differences/ */) AS _u(day)), total_supply_w_gapdays AS (SELECT*,LEAD(day, 1, CURRENT_TIMESTAMP) OVER (ORDER BY day) AS next_dayFROM total_supplyORDER BY1 DESC), total_supply_alldays AS (SELECTd.day,ts.total_supply,ts.next_dayFROM total_supply_w_gapdays AS tsINNER JOIN days AS dON ts.day <= d.day AND d.day < ts.next_day), reserves AS (SELECTday,latest_reserves[3] / TRY_CAST(1e18 AS DOUBLE) AS reserve0,latest_reserves[4] / TRY_CAST(1e18 AS DOUBLE) AS reserve1FROM (SELECTDATE_TRUNC('day', evt_block_time) AS day,(SELECTMAX(ARRAY[evt_block_number, evt_index, reserve0, reserve1])) AS latest_reservesFROM uniswap_v2_ethereum.Pair_evt_SyncWHERE