brian-terraNEAR Allbridge Bridge - Daily Stats
Updated 2024-12-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
30
31
32
33
34
35
36
›
⌄
-- forked from NEAR Multichain Bridge - Daily Stats @ https://flipsidecrypto.xyz/studio/queries/840640b2-caf3-4c71-8bf2-019ecc20a8f5
-- forked from NEAR Wormhole Bridge - Daily Stats @ https://flipsidecrypto.xyz/studio/queries/8aecfa2e-27e8-4caa-81f5-532cb9d904f0
-- forked from NEAR Rainbow Bridge - Daily Stats @ https://flipsidecrypto.xyz/studio/queries/b99caf16-13d9-4a1f-a11d-9f52aa76fec6
-- forked from zyroq / period 3 @ https://flipsidecrypto.xyz/zyroq/q/c0LKVkVDj77R/period-3
SELECT
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS date,
COUNT(DISTINCT TX_HASH) AS bridge_tx,
SUM(AMOUNT_USD) AS total_value_tf,
COUNT(DISTINCT CASE
WHEN direction = 'inbound' THEN destination_address
ELSE source_address
END) AS users,
SUM(bridge_tx) OVER (ORDER BY date) AS cumulative_bridge_tx,
SUM(total_value_tf) OVER (ORDER BY date) AS cumulative_total_value_tf,
SUM(users) OVER (ORDER BY date) AS cumulative_users -- Cumulative unique users
FROM
near.defi.ez_bridge_activity
WHERE
platform = 'allbridge'
and date > '2021-10-27'
GROUP BY
date
ORDER BY
date DESC;
QueryRunArchived: QueryRun has been archived