Query editor
withchain as (select *from UNNEST(SPLIT('{{chain}}', ',')) AS c(chain)),swap as (select block_time,blockchain,tx_hash,tx_from as user,amount_usdfrom dex.tradeswhere 1=1and project = 'uniswap'and blockchain in (select chain from chain)),period_tx_count as (selectblockchain,sum (case when b.block_time between from_unixtime(1710338135) - interval '{{before_upgrade_days}}' day and from_unixtime(1710338135)then 1 else 0 end) as before_tx_count,sum (case when b.block_time between from_unixtime(1710338135) and from_unixtime(1710338135) + interval '{{after_upgrade_days}}' daythen 1 else 0 end) as after_tx_count,count(distinct case when b.block_time between from_unixtime(1710338135) - interval '{{before_upgrade_days}}' day and from_unixtime(1710338135)then b.user else null end) as before_unique_user,count(distinct case when b.block_time between from_unixtime(1710338135) and from_unixtime(1710338135) + interval '{{after_upgrade_days}}' daythen b.user else null end) as after_unique_userfrom swap bwhere b.block_time between from_unixtime(1710338135) - interval '{{before_upgrade_days}}' dayand from_unixtime(1710338135) + interval '{{after_upgrade_days}}' day -- eip-4844 upgrade: unix_time(1710338135), 2024-03-13 13:55group by 1)select blockchain,before_tx_count,after_tx_count,cast(after_tx_count - before_tx_count as double)/before_tx_count as tx_change,before_unique_user,after_unique_user,cast(after_unique_user - before_unique_user as double)/before_unique_user as user_changefrom period_tx_countorder by 4 desc