LTirrelllfg_balances
    Updated 2022-03-15
    with layer_one as (
    select
    BLOCK_TIMESTAMP,
    TX_ID,
    SENDER,
    RECIPIENT,
    AMOUNT,
    AMOUNT_USD,
    CURRENCY,
    CONTRACT_ADDRESS,
    CONTRACT_LABEL,
    case
    when recipient = 'terra1gr0xesnseevzt3h4nxr64sh5gk4dwrwgszx3nw' then 'Luna Foundation Guard'
    when recipient = 'terra1cymh5ywgn4azak74h4gsrnakqgel4y9ssersvx' then 'Burn LUNA'
    when recipient = 'terra13h0qevzm8r5q0yknaamlq6m3k8kuluce7yf5lj' then 'Fund Anchor Reserve'
    when recipient = 'terra1qy36laaky2ns9n98naha2r0nvt3j7q3fpxfs2e' then 'Send UST to Ethereum (Wormhole)'
    when recipient = 'terra1xmaaewtj7c2s7fjak8g9eqp8ll68hvvyudrfev' then 'Vesting Contract'
    else recipient_address_name
    end as to_label,
    case
    when sender = 'terra1dp0taj85ruc299rkdvzp4z5pfg6z6swaed74e6' then 'Terraform Labs'
    else 'Luna Foundation Guard'
    end as from_label,
    'terra' as chain
    FROM
    terra.transfer_events
    where
    block_timestamp > current_date - 100
    and (
    sender = 'terra1gr0xesnseevzt3h4nxr64sh5gk4dwrwgszx3nw'
    or (
    recipient = 'terra1gr0xesnseevzt3h4nxr64sh5gk4dwrwgszx3nw'
    and sender = 'terra1dp0taj85ruc299rkdvzp4z5pfg6z6swaed74e6'
    )
    )
    and amount_usd > 1000
    Run a query to Download Data