Keyrock[4] Wallet Analysis - Chain Mod
Updated 2024-02-23
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 Sender_tb AS (
SELECT sender AS address, destination_chain
FROM ethereum.defi.ez_bridge_activity
WHERE block_timestamp > '2023-10-01' AND destination_chain IN ('near', 'solana', 'sui', 'osmosis', 'aptos', 'telos','sei','injective')
),
Origin_tb AS (
SELECT origin_from_address AS address, destination_chain
FROM ethereum.defi.ez_bridge_activity
WHERE block_timestamp > '2023-10-01' AND destination_chain IN ('near', 'solana', 'sui', 'osmosis', 'aptos', 'telos','sei','injective')
),
Full_tb AS (
SELECT * FROM Sender_tb
UNION ALL
SELECT * FROM Origin_tb
),
ChainCounts AS (
SELECT
address,
COUNT(DISTINCT destination_chain) AS tot_chain
FROM Full_tb
WHERE address != '0x0000000000000000000000000000000000000000'
GROUP BY address
)
SELECT
Chains_Count.range AS num_chains_range,
COUNT(address) AS num_addresses
FROM ChainCounts subquery
CROSS JOIN (
VALUES
(1, '1 Chain'),
(2, '2 Chains'),
(3, '3 Chains'),
(4, '4 or more Chains')
) AS Chains_Count(count_threshold, range)
WHERE subquery.tot_chain >= Chains_Count.count_threshold
QueryRunArchived: QueryRun has been archived