Keyrock[4] Wallet Analysis Bridge - Count
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, platform
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, platform
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
)
SELECT
Bridges_Count.range AS num_bridges_range,
COUNT(subquery.address) AS num_wallets
FROM (
SELECT
address,
COUNT(DISTINCT platform) AS tot_bridges
FROM Full_tb
WHERE address != '0x0000000000000000000000000000000000000000'
GROUP BY address
) subquery
CROSS JOIN (
VALUES
(1, '1 Bridge'),
(2, '2 Bridges'),
(3, '3 Bridges'),
(4, '4 or more Bridges')
) Bridges_Count(count_threshold, range)
WHERE subquery.tot_bridges >= Bridges_Count.count_threshold
GROUP BY Bridges_Count.range
QueryRunArchived: QueryRun has been archived