maybeyonassushi_shill_amm
    Updated 2021-12-29
    select * from (
    select
    balance_date,
    sum(amount_usd) as tvl,
    sum(
    case when label_subtype = 'pool' then amount_usd else 0 end
    ) as pool_liq,
    sum(
    case when user_address = lower('0xF5BCE5077908a1b7370B9ae04AdC565EBd643966') then amount_usd else 0 end
    ) as bento_liq,
    sum(
    case when user_address = lower('0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272') then amount_usd else 0 end
    ) as bar_liq,
    sum(
    case when user_address = lower('0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272') then balance else 0 end
    ) as bar_sushi
    from ethereum.erc20_balances
    where label = 'sushiswap' or user_address = lower('0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272')
    group by 1
    )
    where tvl <= 8000000000
    -- limit 100

    -- dex token_contract
    -- dex pool
    -- dex swap_contract
    Run a query to Download Data