Query editor
--Error: Query is too long for wand tools.--Try shortening query to try again./* Error: Query could not be fully debugged due to errors on multiple lines. *//* Try shortening query to try again. *//* Migration success :)There are some cases such as unnest/sequence and array/json functions the migrator won't take care of for you(but we have examples of in the docs linked below!)If you're still running into issues, check out the doc examples https://dune.com/docs/reference/dune-v2/query-engine/or reach out to us in the Dune discord in the #dune-sql channel.*/WITH deposits AS (SELECTDATE_TRUNC('month', token1.evt_block_time) AS month_d,token2.symbol AS token_d,token2.contract_address AS contract_address_d,SUM(TRY_CAST(value AS DOUBLE) / POWER(10, token2.decimals)) AS amount_dFROM erc20_ethereum.evt_Transfer AS token1LEFT JOIN tokens.erc20 AS token2ON token1.contract_address = token2.contract_addressWHERE("to" = 0xfa7093cdd9ee6932b4eb2c9e1cde7ce00b1fa4b9 ANDblockchain = 'ethereum')GROUP BY1,2,3unionSELECTDATE_TRUNC('month', token1.evt_block_time) AS month_d,token2.symbol AS token_d,token2.contract_address AS contract_address_d,SUM(CAST(value AS DOUBLE) / POWER(10, token2.decimals)) AS amount_dFROMerc20_polygon.evt_Transfer AS token1LEFT JOIN tokens.erc20 AS token2 ON token1.contract_address = token2.contract_addressWHERE"to" = 0x19B620929f97b7b990801496c3b361CA5dEf8C71AND (blockchain = 'polygon')GROUP BY1,2,3unionSELECTDATE_TRUNC('month', token1.evt_block_time) AS month_d,token2.symbol AS token_d,token2.contract_address AS contract_address_d,SUM(CAST(value AS DOUBLE) / POWER(10, token2.decimals)) AS amount_dFROMerc20_arbitrum.evt_Transfer AS token1