jackguy$ZYB Token Distribution
Updated 2023-03-06
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
›
⌄
with tab1 as (
SELECT
from_address,
sum(raw_amount / power(10, 18 )) as out_volume
FROM arbitrum.core.fact_token_transfers
where contract_address LIKE lower('0x3B475F6f2f41853706afc9Fa6a6b8C5dF1a2724c')
GROUP BY 1
), tab2 as (
SELECT
to_address,
sum(raw_amount / power(10, 18 )) as in_volume
FROM arbitrum.core.fact_token_transfers
where contract_address LIKE lower('0x3B475F6f2f41853706afc9Fa6a6b8C5dF1a2724c')
GROUP BY 1
)
SELECT
to_address as wallet,
sum(in_volume - CASE when out_volume is NULL then 0 else out_volume end) as LP_token_ballance
FROM tab2
LEFT outer join tab1
on from_address = to_address
GROUP BY 1
--having not wallet in ('0x9ba666165867e916ee7ed3a3ae6c19415c2fbddd', lower('0x46c6bc2284ff5c9cab50cedbbdc479af3e49ac60'))
HAVING LP_token_ballance > 0
ORDER BY 2 DESC
Run a query to Download Data