Query editor
withsub as (selecttopic1,date_trunc('day', block_time) as day,count(*) as num_fills,max(tx_hash) as examplefromethereum.logswherecontract_address = 0x881d40237659c251811cec9c364ef91dc08d300c -- swap event address is 881and block_time > date_trunc('day', now() - interval '365' day)group by1, 2)selectcasewhen topic1 = 0xf35f348d53012d52a5d39f9390d246956ac932d5778d2bb49e359dba4fa0896d then '1inch'when topic1 = 0x62db2e87ad4360c521a990935f97f7c44833c4f99a8f1c09129331715b07f525 then 'MEV Bot: 0xa69babe'when topic1 = 0x0e8df7af94a59bebc3df5813833091b9230977db973545c17273ab59a38c7818 then 'PMM'when topic1 = 0x0f15df26153967931fbcb8c0d3b573946eced4ef196e2d07ec13f437ff36584e then 'Airswap'when topic1 = 0x015123c6e2552626efe611b6c48de60d080a6650860a38f237bc2b6f651f79d1 then 'Airswap'when topic1 = 0x9e4182a38ef65fd4828a1563124c6ada8e2cd461a1a638cbc46803f0cd3e7f48 then 'Paraswap'when topic1 = 0xcbf46790f422d91c0bc3f78784cac5d123211479f745ef4d632dfd71fd4d53f3 then 'Open Ocean'when topic1 = 0xa8dc30b66c6d4a8aac3d15925bfca09e42cac4a00c50f9949154b045088e2ac2 then '0x'when topic1 = 0x3ef3c00071253ec2c927305151c4ef63c615047982b99857a44557bf0c1e3c45 then 'Hashflow'when topic1 = 0xbd5c436f8c83379009c1962310b8347e561d1900906d3fe4075b1596f8955f88 then '1inch'when topic1 = 0xa06d1ebec95550faee235885bf6dd56b011479008896fbe07e1c3bf19fead10e then 'KyberSwap'else cast(topic1 as varchar)end as project_name,casewhen topic1 = 0xf35f348d53012d52a5d39f9390d246956ac932d5778d2bb49e359dba4fa0896d then 'oneInchV5FeeDynamic'when topic1 = 0x62db2e87ad4360c521a990935f97f7c44833c4f99a8f1c09129331715b07f525 then 'pmmFeeDynamicv4'when topic1 = 0x0e8df7af94a59bebc3df5813833091b9230977db973545c17273ab59a38c7818 then 'pmmFeeDynamic'when topic1 = 0x015123c6e2552626efe611b6c48de60d080a6650860a38f237bc2b6f651f79d1 then 'airswapLight4FeeDynamicFixed'when topic1 = 0x0f15df26153967931fbcb8c0d3b573946eced4ef196e2d07ec13f437ff36584e then 'airswapLight3FeeDynamic'when topic1 = 0x9e4182a38ef65fd4828a1563124c6ada8e2cd461a1a638cbc46803f0cd3e7f48 then 'paraswapV5FeeDynamic'when topic1 = 0xcbf46790f422d91c0bc3f78784cac5d123211479f745ef4d632dfd71fd4d53f3 then 'openOceanFeeDynamic'when topic1 = 0xa8dc30b66c6d4a8aac3d15925bfca09e42cac4a00c50f9949154b045088e2ac2 then '0xFeeDynamic'when topic1 = 0x3ef3c00071253ec2c927305151c4ef63c615047982b99857a44557bf0c1e3c45 then 'hashFlowFeeDynamic'when topic1 = 0xbd5c436f8c83379009c1962310b8347e561d1900906d3fe4075b1596f8955f88 then 'oneInchV4FeeDynamic'when topic1 = 0xa06d1ebec95550faee235885bf6dd56b011479008896fbe07e1c3bf19fead10e then 'kyberSwapFeeDynamic'else cast(topic1 as varchar)end as decoded_aggregator_id,*fromsuborder by5 desc