Eman-Raz5IRE Transfer From CEX
    Updated 2024-01-29
    with tab1 as (select from_address, to_address, amount, AMOUNT_USD, tx_hash
    from ethereum.core.ez_token_transfers
    where contract_address=LOWER('0x3bd7d4F524D09F4e331577247A048D56e4b67a7F')),

    tab2 as (select address, LABEL
    from ethereum.core.dim_labels
    where label_type='cex')

    select LABEL AS CEX, COUNT(DISTINCT to_address) AS "5IRE Receivers", ROUND(sum(amount)) "volume (5IRE)", ROUND(sum(amount_USD)) "volume (USD)", COUNT(DISTINCT tx_hash) as "Transfers Count"
    from tab1 left join tab2 on tab1.from_address=tab2.address
    WHERE LABEL IS NOT NULL
    group by 1