jkhuhnke11Profile of Wallets that Hold Both Balancer And AAVE
Updated 2023-03-09
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH balancer_users as (
SELECT
user_address as address,
current_bal as balancer_balance
FROM ETHEREUM.CORE.EZ_CURRENT_BALANCES
WHERE contract_address = LOWER('0xba100000625a3754423978a60c9317c58a424e3D')
AND current_bal > 0
),
aave_users as (
SELECT
user_address as address,
current_bal as aave_balance
FROM ETHEREUM.CORE.EZ_CURRENT_BALANCES
WHERE contract_address = LOWER('0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9')
AND current_bal > 0
),
both as (
SELECT
a.address,
aave_balance,
balancer_balance
FROM aave_users a
INNER JOIN balancer_users b
ON a.address = b.address
),
age AS (
SELECT
address,
datediff('day', min(block_timestamp :: date), current_date()) as days_old
FROM both b
INNER JOIN ETHEREUM.CORE.FACT_TRANSACTIONS t
ON b.address = t.from_address
GROUP BY address
),
counts as (
SELECT
Run a query to Download Data