sammonthly capital inflow from CEX - UST
    Updated 2022-03-13

    --where label_type = 'cex'
    --and label_subtype != 'memo_hot_wallet' -- label subtype deposit_wallet and hot_wallet
    -- hot wallet --> find transaction from this address sending to address not in labels.
    -- deposit_wallet --> transactions sending to this address
    -- memo hot wallet - address name osit --> transactions sending to this address
    -- memo hot wallet - address name withdraw --> transactions from this address sending to address not in label
    --and label != 'bithumb'
    --and address_name like '%withdraw%'
    --and address_name like '%osit%'
    --and address_name like '%binance%'

    with hot_wallet_from_cex as (
    select
    address
    from terra.labels
    where label_type = 'cex'
    and label_subtype = 'hot_wallet'
    ),

    deposit_wallet_to_cex as (
    select
    address
    from terra.labels
    where label_type = 'cex'
    and label_subtype = 'deposit_wallet'
    ),

    memo_to_cex as (
    select
    address
    from terra.labels
    where label_type = 'cex'
    and label_subtype = 'memo_hot_wallet'
    and address_name like '%osit%'
    ),
    Run a query to Download Data