KaskoazulHead to Head DAI
    Updated 2022-03-26
    WITH TOP10DAI as (
    select eb.user_address,
    eb.balance as balance,
    eb.label,
    eb.label_subtype,
    eb.label_type,
    eb.address_name,
    eb.symbol
    from ethereum.erc20_balances eb
    --left join terra.labels l
    --on db.address = l.address
    where balance_date = '2022-03-23'
    and contract_address = lower('0x6b175474e89094c44da98b954eedeac495271d0f')
    and balance > 0
    --and db.address = 'terra1gr0xesnseevzt3h4nxr64sh5gk4dwrwgszx3nw' --LFG
    order by balance desc
    LIMIT 10
    ),

    DAIFOUNDATION as (
    select eb.user_address,
    'dai foundation' as address_name,
    eb.balance/pow(10,9) as balance,
    eb.symbol,
    eb.label,
    eb.label_subtype,
    eb.label_type
    from ethereum.erc20_balances eb
    where balance_date > '2022-03-01'
    and eb.user_address = '0x85a294558d5597ac156dd920a74b502b6f2b1b86' --DAI Foundation
    )


    select user_address,
    case user_address
    when '0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7' then 1