SpecterClaim Trend and cumu
Updated 2024-08-16
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
›
⌄
WITH claims_with_amount AS (
SELECT block_timestamp,
tx_hash, to_address as user_address, amount_usd
FROM
arbitrum.core.ez_native_transfers
WHERE
origin_function_signature IN ('0x6ba4c138')
AND from_address = lower('0x1cdc19b13729f16c5284a0ace825f83fc9d799f4')
AND block_timestamp >= '2024-06-26'
-- and tx_hash = '0x93bf4ddc63b1a61a507cb475df13f79652fba7abce16c7a96fa83f2246d484a1'
)
SELECT
DATE_TRUNC('Day', block_timestamp) AS Date,
COUNT(DISTINCT tx_hash) AS daily_claim,
SUM(amount_usd) AS daily_amount_usd,
SUM(COUNT(DISTINCT tx_hash)) OVER (ORDER BY date) AS cumulative_claim,
SUM(SUM(amount_usd)) OVER (ORDER BY date) AS cumulative_amount_usd,
COUNT(DISTINCT user_address) AS daily_claimer
FROM
claims_with_amount
GROUP BY
date
ORDER BY
date DESC;
-- SELECT*
-- FROM arbitrum.core.ez_native_transfers
-- WHERE origin_function_signature = '0x6ba4c138'
-- AND FROM_ADDRESS = lower('0x1cdc19b13729f16c5284a0ace825f83fc9d799f4')
-- limit 10;
-- -- WHERE TX_HASH = '0x876b06fd161efb97249ec8a953ab7eeeb3f6e5414effb26fbe75fa4096043217'
QueryRunArchived: QueryRun has been archived