misaghlbmetrics dao - flipside multis
Updated 2022-08-05
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 flipside_users as (
SELECT DISTINCT TO_ADDRESS from ethereum.core.ez_token_transfers
where ORIGIN_FROM_ADDRESS = '0xc2f41b3a1ff28fd2a6eee76ee12e51482fcfd11f'
and FROM_ADDRESS = '0xd152f549545093347a162dce210e7293f1452150'
-- and tx_hash = '0xa3fbf9fd5680989f3185434a5cdec4d746caff4441794d38205f2ae4379c3cc8'
),
multi as (
SELECT TO_ADDRESS, COUNT(DISTINCT FROM_ADDRESS) as users from (
SELECT FROM_ADDRESS, TO_ADDRESS from ethereum.core.ez_token_transfers
where FROM_ADDRESS in (SELECT TO_ADDRESS from flipside_users)
-- and FROM_ADDRESS = lower('0x7c388b94456df48717f95bf7aad6e5c8e8d655ce')
)
GROUP by TO_ADDRESS having users >= 2
order by users DESC
-- limit 1000
),
-- SELECT COUNT(DISTINCT TO_ADDRESS) from multi
transfer_trxs as (
SELECT * from ethereum.core.ez_token_transfers
where FROM_ADDRESS in (SELECT TO_ADDRESS from flipside_users)
and to_address in (select TO_ADDRESS from multi)
and to_address='0xb21378f012eedc08c58724d4c67de11a6b9012ee'
and to_address not in (
SELECT ADDRESS from ethereum.core.dim_labels
)
-- and tx_hash = '0xe45213102613c7c920913d58c82a3e3feda6859b59372e3c2504ca6f2667a6bf'
and tx_hash not in (select tx_hash from ethereum.core.ez_nft_sales)
and tx_hash not in (select tx_hash from ethereum.core.ez_dex_swaps)
and CONTRACT_ADDRESS in ('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2')
and ORIGIN_FUNCTION_SIGNATURE = '0xa9059cbb'
-- LIMIT 100
)
select *
from transfer_trxs
Run a query to Download Data