theericstoneEthereum Billionaires
    Updated 2023-01-04
    with millionaires as (
    select
    distinct(address)
    from crosschain.core.address_tags
    where tag_name IN ('wallet billionaire')
    and creator = 'flipside'
    and blockchain = 'ethereum'
    and (end_date > current_date - 15 or end_date IS NULL)
    ),
    thisweek as (
    SELECT
    symbol_out, token_out,
    count(distinct(tx_to)) as n_buyers,
    sum(amount_out_usd) as amount_acquired_this_week
    FROM
    ethereum.core.ez_dex_swaps
    where
    amount_out_usd > 100000
    and block_timestamp > current_date - 7
    and NOT (symbol_out LIKE ANY ('%DAI','%USDT','%USDC','%BTC','%ETH','%USD%','%EUR'))
    and tx_to in (
    select address from millionaires
    )
    group by 1,2
    ),
    lastweek as (
    SELECT
    symbol_out, token_out,
    count(distinct(tx_to)) as n_buyers,
    sum(amount_out_usd) as amount_acquired_last_week
    FROM
    ethereum.core.ez_dex_swaps
    where
    amount_out_usd > 100000
    and block_timestamp < current_date - 7
    and block_timestamp > current_date - 14
    Run a query to Download Data