yasmin-n-d-r-hاشظب
Updated 2023-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
31
32
33
34
35
36
›
⌄
WITH SquidData AS (
SELECT
sender AS user,
DATE_TRUNC('day', block_timestamp) AS date,
'Squid' AS bridge,
tx_hash
FROM
axelar.defi.ez_bridge_squid
WHERE
source_chain = 'base' OR destination_chain = 'base'
GROUP BY
sender, 'Squid', DATE_TRUNC('day', block_timestamp), tx_hash
),
DailyUsers AS (
SELECT
date,
bridge,
COUNT(DISTINCT user) AS users,
COUNT(DISTINCT tx_hash) AS transaction_count
FROM
SquidData
GROUP BY
date, bridge
)
SELECT
date,
users AS " users",
transaction_count AS "Transactions",
SUM(users) OVER (ORDER BY date ASC) AS "Cumulative users",
SUM(transaction_count) OVER (ORDER BY date ASC) AS "Cumulative Transactions"
FROM
DailyUsers
WHERE
date >= '2023-08-01'
ORDER BY
date ASC;