maybeyonassushi_shill_mcap
    Updated 2021-12-29
    with
    token_bal as (
    select *,
    case contract_address
    when '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2' then 'sushi'
    when '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' then 'uniswap'
    when lower('0xD533a949740bb3306d119CC777fa900bA034cd52') then 'curve'
    when lower('0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9') then 'aave'
    when '0xc00e94cb662c3520282e6f5717214004a7f26888' then 'comp'
    when '0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e' then 'yearn'
    end as token_name
    from ethereum.erc20_balances
    where contract_address in (
    '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2',
    '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984',
    lower('0xD533a949740bb3306d119CC777fa900bA034cd52'),
    lower('0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9'),
    '0xc00e94cb662c3520282e6f5717214004a7f26888',
    '0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e'
    )
    and balance_date = current_date
    and balance > 0
    -- and label is null
    -- and address_name is null
    -- and label_type is null
    -- and label_subtype is null
    ),
    token_mcap as (
    select
    token_name,
    round(price,2) as price,
    round(sum(balance)) as supply,
    round(sum(amount_usd)) as mcap
    from token_bal
    group by 1,2
    )
    Run a query to Download Data