Updated 2023-03-17
    -- forked from 7f09b8f5-07ea-4e46-876d-cb0805a6f4e7

    -- forked from de044202-d0d1-4621-94ac-a69870256c23

    -- forked from 76e75d3a-dbcb-40e1-a942-3f259f85feb6

    with excluded_protocols(protocols) as (SELECT * FROM values(
    'chainlink'), ('uniswap'), ('balancer'), ('traderjoe')
    , ('kyberswap'), ('aave'), ('dodo'), ('curve'), ('sushiswap'))

    SELECT sum(fees), protocol FROM external.defillama.fact_protocol_fees_revenue
    where chain = 'arbitrum'
    and date > sysdate() - interval '1 months'
    and protocol not in (SELECT protocols FROM excluded_protocols)
    GROUP BY 2




    Run a query to Download Data