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.*/WITHLensdrop AS (SELECTcall_tx_hash,recipientsFROMlensdrop_polygon.Lensdrop_call_batchSendNativeTokenWHEREcall_success = TRUEUNION ALLSELECTcall_tx_hash,recipientsFROMlensdrop_polygon.Lensdrop_call_batchSendERC721WHEREcall_success = TRUEUNION ALLSELECTcall_tx_hash,recipientsFROMlensdrop_polygon.Lensdrop_call_batchSendERC20WHEREcall_success = TRUEUNION ALLSELECTcall_tx_hash,recipientsFROMlensdrop_polygon.Lensdrop_call_batchSendERC1155WHEREcall_success = TRUE)SELECTCOUNT(airdrops) AS unique_users,SUM(recipients) AS recipients,SUM(airdrops) AS total_airdropsFROM(SELECTCOUNT(recipients) AS airdrops,SUM(CARDINALITY(recipients)) AS recipientsFROMLensdropJOIN polygon.transactions AS t ON t.hash = call_tx_hashGROUP BY"from")