buzzresearchBridging Overview
Updated 2024-09-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
›
⌄
WITH bridge_stats AS (
SELECT
DATE_TRUNC('week', BLOCK_TIMESTAMP) AS week,
COUNT(DISTINCT TX_HASH) AS num_transactions,
COUNT(DISTINCT SENDER) AS num_senders,
COUNT(DISTINCT RECEIVER) AS num_receivers,
SUM(AMOUNT_USD) AS amount_bridged
FROM
arbitrum.defi.ez_bridge_activity
WHERE
BLOCK_TIMESTAMP <= CURRENT_DATE
GROUP BY
DATE_TRUNC('week', BLOCK_TIMESTAMP)
)
SELECT
week,
num_transactions,
SUM(num_transactions) OVER (ORDER BY week) AS cumulative_transactions,
num_senders,
SUM(num_senders) OVER (ORDER BY week) AS cumulative_senders,
num_receivers,
SUM(num_receivers) OVER (ORDER BY week) AS cumulative_receivers,
amount_bridged,
SUM(amount_bridged) OVER (ORDER BY week) AS cumulative_amount,
FROM
bridge_stats
ORDER BY
week DESC;
QueryRunArchived: QueryRun has been archived