Query editor
-- As long as you retain this notice you can do whatever you want with this stuff.-- If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.-- Layer Zero Transactions Count by Chainwith chains as (select *from query_2621526),daily_summary as (selectdate_trunc('day', block_time) as block_date,source_chain_name,count(*) as transaction_count,count(distinct user_address) as active_user_countfrom layerzero.send twhereblock_time >= date('2023-01-01') andblock_time < current_dategroup by 1, 2order by 1, 2),daily_summary_lead as (select block_date,transaction_count,active_user_count,source_chain_name,lag(transaction_count) over (order by block_date) as previous_transaction_count,lag(active_user_count) over (order by block_date) as previous_active_user_countfrom daily_summaryorder by block_date)select block_date,transaction_count,source_chain_name,active_user_countfrom daily_summary_leadorder by block_date