Query editor
/* 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.*/WITHZkSyncEra AS (SELECT DISTINCT"from"FROMethereum."transactions"WHERE"to" = 0x32400084C286CF3E17e7B677ea9583e60a000324AND CAST(value AS DOUBLE) > 0AND "block_time" > CAST('2023-01-01' AS TIMESTAMP)AND "block_time" < CAST('2023-04-10' AS TIMESTAMP)AND success = TRUE),senders_transactions AS (SELECT"from","to"FROMethereum."transactions"WHERE"from" IN (SELECT"from"FROMZkSyncEra)AND CAST(value AS DOUBLE) > 0AND "block_time" > CAST('2023-01-01' AS TIMESTAMP)AND "block_time" < CAST('2023-04-10' AS TIMESTAMP)AND success = TRUE)SELECTROW_NUMBER() OVER (ORDER BYCOUNT(DISTINCT st."to") DESC NULLS FIRST) AS "Rank",REPLACE(CAST(st."from" AS VARCHAR), '\', '0') AS current_owner,COUNT(DISTINCT st."to") AS unique_receiversFROMsenders_transactions AS stGROUP BY2ORDER BY"Rank"