BlockTrackerDefillama bridge over time -n chains copy
    Updated 2023-08-24
    -- forked from Defillama bridge over time -n chains @ https://flipsidecrypto.xyz/edit/queries/ffd89f1e-0fb7-4e28-a8bf-ec2df5e3e309

    -- forked from Defillama bridge over time @ https://flipsidecrypto.xyz/edit/queries/b6faf1ba-e711-40da-8fad-22175be0a664
    --external.defillama.fact_bridge_volume
    SELECT
    date,
    b.chain,
    a.bridge_name,
    sum(deposit_txs) as txs_deposit,
    sum(withdraw_txs) as txs_withdraw,
    txs_deposit + txs_withdraw as total_txs,
    sum(deposit_usd) as vol_deposit_usd,
    sum(withdraw_usd) as vol_withdraw_usd,
    vol_deposit_usd + vol_withdraw_usd as total_usd
    FROM external.defillama.fact_bridge_volume a
    LEFT JOIN external.defillama.dim_protocols b ON a.bridge ilike b.protocol_slug
    WHERE date < current_date
    GROUP BY 1 , 2 , 3
    ORDER BY 1 DESC






    Run a query to Download Data