blanchemaria2023-04-16 09:53 AM
    Updated 2023-04-16
    with protocol_list as ( select distinct protocol
    from external.defillama.fact_dex_volume
    where chain ilike 'optimism')
    select date, protocol, sum(volume) as daily_volume
    from external.defillama.fact_dex_volume
    where chain ilike 'optimism'
    and protocol in (select * from protocol_list)
    group by 1,2
    Run a query to Download Data