IBC_insiderEthereum daily cex flow
    Updated 2023-05-23
    {{param_sbsQ}}
    with cex as
    (select address,label from
    ethereum.core.dim_labels
    where
    LABEL_TYPE like 'cex')


    , dex as
    (select address,label from
    ethereum.core.dim_labels
    where
    LABEL_TYPE like 'dex')

    ,

    outflow as
    (select


    label as cex,
    sum(AMOUNT) as outflow ,
    date_trunc('{{day-week-month}}',BLOCK_TIMESTAMP ) as date
    from
    ethereum.core.ez_token_transfers a inner join
    cex b on a.FROM_ADDRESS=b.ADDRESS
    where
    SYMBOL='UNI' and AMOUNT<1e9
    group by date,label) ,




    inflow as
    (select
    Run a query to Download Data