mattkstewQualified Pools 4
Updated 2022-07-06Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with tab1 as (
select
ethereum.core.dim_dex_liquidity_pools.pool_address as pool,
avg(flipside_prod_db.ethereum.erc20_balances.amount_usd)
from ethereum.core.dim_dex_liquidity_pools
left outer join flipside_prod_db.ethereum.erc20_balances
on ethereum.core.dim_dex_liquidity_pools.pool_address = flipside_prod_db.ethereum.erc20_balances.user_address
where balance_date > current_date - 4
group by 1
having avg(flipside_prod_db.ethereum.erc20_balances.amount_usd) > 100000
)
select
flipside_prod_db.ethereum.erc20_balances.symbol,
avg(flipside_prod_db.ethereum.erc20_balances.amount_usd)
from ethereum.core.dim_dex_liquidity_pools
left outer join flipside_prod_db.ethereum.erc20_balances
on ethereum.core.dim_dex_liquidity_pools.pool_address = flipside_prod_db.ethereum.erc20_balances.user_address
where ethereum.core.dim_dex_liquidity_pools.pool_address in (select pool from tab1 )
and balance_date > current_date - 4
group by 1
Run a query to Download Data