brian-terraNEAR Rainbow 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
›
⌄
-- 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 = 'rainbow'
and date > '2021-10-27'
GROUP BY
date
ORDER BY
date DESC;
QueryRunArchived: QueryRun has been archived