anomoneBankless - Pie chart of whales vs members
    Updated 2022-11-28
    WITH roles as (SELECT
    BALANCE_DATE,
    USER_ADDRESS,
    CASE WHEN BALANCE >= 35000 and BALANCE <= 150000 THEN 'Member'
    WHEN BALANCE > 150000 THEN 'Whale'
    ELSE 'Guest' END as "ROLE",
    BALANCE
    FROM ethereum.erc20_balances

    WHERE CONTRACT_ADDRESS = LOWER('0x2d94aa3e47d9d5024503ca8491fce9a2fb4da198')
    AND BALANCE_DATE = to_date('2022-03-06')
    )

    SELECT * FROM roles
    WHERE ROLE <> 'Guest'
    Run a query to Download Data