vegardSafe Wallet number
Updated 2022-09-14
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 LIST1 AS (
SELECT * FROM ethereum.core.fact_transactions c
WHERE EXISTS (
SELECT * FROM ethereum.core.fact_event_logs d
WHERE c.TX_HASH = d.TX_HASH
AND CONTRACT_ADDRESS IN (SELECT ADDRESS FROM ethereum.core.dim_contracts WHERE NAME ilike '%airdrop%')
)
),
LIST2 AS (
SELECT * FROM ethereum.core.fact_transactions a
WHERE EXISTS (
SELECT BYTES_SIGNATURE FROM
ethereum.core.dim_function_signatures b
WHERE text_signature ilike '%airdrop%'
AND b.bytes_signature = a.origin_function_signature
)),
LIST3 AS (
SELECT distinct(FROM_ADDRESS) AS WALLET_ADDRESS FROM LIST1
UNION
SELECT distinct(TO_ADDRESS) AS WALLET_ADDRESS FROM LIST1
UNION
SELECT distinct(FROM_ADDRESS) AS WALLET_ADDRESS FROM LIST2
UNION
SELECT distinct(TO_ADDRESS) AS WALLET_ADDRESS FROM LIST2
)
SELECT COUNT(DISTINCT(WALLET_ADDRESS)) AS TOTAL_WALLET_ADDRESS_NUMBER FROM LIST3
Run a query to Download Data