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.SELECTCOUNT(DISTINCT CASE WHEN block_time > CURRENT_TIMESTAMP - INTERVAL '30' day THEN "from" ELSE NULL END) AS users_last_30_days, -- Counting the number of unique users in the last 7 daysSUM(CASE WHEN block_time > CURRENT_TIMESTAMP - INTERVAL '30' day THEN value / CAST(1e18 AS DOUBLE) ELSE 0 END) AS TVB_last_30_days, -- Calculating the Total Value Bridged in the last 7 daysCOUNT(DISTINCT "from") AS users_all_time, -- Counting the number of unique users of all timeSUM(value / CAST(1e18 AS DOUBLE)) AS TVB_all_time ,-- Calculating the Total Value Bridged of all timecase when "to" = 0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f then 'Arbitrum Official Bridge Contract'when "to" = 0x52ec2F3d7C5977A8E558C8D9C6000B615098E8fC OR "to" = 0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1 then 'Optimism Bridge Contract'when "to" = 0xaBEA9132b05A70803a4E85094fD0e1800777fBEF OR "to" = 0x32400084C286CF3E17e7B677ea9583e60a000324 then 'zkSync Lite Bridge'when "to" = 0xae0Ee0A63A2cE6BaeEFFE56e7714FB4EFE48D419 then 'StarkNet Offical Bridge'when "to" = 0x49048044D57e1C92A77f79988d21Fa8fAF74E97e then 'Base Bridge Contract'when "to" = 0x50002CdFe7CCb0C41F519c6Eb0653158d11cd907 then 'Aptos Bridge'Else 'unknow' END AS BRIDGEFROMethereum."transactions"WHERE "TO" IN (0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f, 0x52ec2F3d7C5977A8E558C8D9C6000B615098E8fC ,0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1, 0x32400084C286CF3E17e7B677ea9583e60a000324,0xaBEA9132b05A70803a4E85094fD0e1800777fBEF, 0x32400084C286CF3E17e7B677ea9583e60a000324,0xae0Ee0A63A2cE6BaeEFFE56e7714FB4EFE48D419, 0x49048044D57e1C92A77f79988d21Fa8fAF74E97e, 0x50002CdFe7CCb0C41F519c6Eb0653158d11cd907)AND success = True-- Filtering only successful transactionsAND value > 0GROUP BY case when "to" = 0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f then 'Arbitrum Official Bridge Contract'when "to" = 0x52ec2F3d7C5977A8E558C8D9C6000B615098E8fC OR "to" = 0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1 then 'Optimism Bridge Contract'when "to" = 0xaBEA9132b05A70803a4E85094fD0e1800777fBEF OR "to" = 0x32400084C286CF3E17e7B677ea9583e60a000324 then 'zkSync Lite Bridge'when "to" = 0xae0Ee0A63A2cE6BaeEFFE56e7714FB4EFE48D419 then 'StarkNet Offical Bridge'when "to" = 0x49048044D57e1C92A77f79988d21Fa8fAF74E97e then 'Base Bridge Contract'when "to" = 0x50002CdFe7CCb0C41F519c6Eb0653158d11cd907 then 'Aptos Bridge'Else 'unknow' END