USERS | |
---|---|
1 | 18418 |
freemartianTotal Users - Base & Ethereum
Updated 2 days ago
999
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 Total Amount - Base & Ethereum @ https://flipsidecrypto.xyz/studio/queries/588bb038-6e78-456a-b319-4c69e362f5fa
WITH prices AS(
SELECT
hour::date AS price_day,
AVG(price) AS price
FROM ethereum.price.ez_prices_hourly
WHERE token_address = '0xb23d80f5fefcddaa212212f028021b41ded428cf'
AND hour::date >= '2024-06-01'
GROUP BY 1
),
current_prices AS(
SELECT
hour AS price_day,
price,
FROM ethereum.price.ez_prices_hourly
WHERE token_address = '0xb23d80f5fefcddaa212212f028021b41ded428cf'
AND hour = DATEADD(hour,-2,to_char(current_timestamp,'YYYY-MM-DD HH24:00:00'))
),
eth_deposits AS (
SELECT
block_timestamp,
tx_hash,
decoded_log:user :: string AS user,
decoded_log:amount / pow(10,18) AS amount,
price * (decoded_log:amount / pow(10,18)) AS amount_usd,
'Ethereum Deposit' AS label
FROM ethereum.core.ez_decoded_event_logs
INNER JOIN prices ON (block_timestamp::date = price_day)
WHERE contract_address = '0x4a3826bd2e8a31956ad0397a49efde5e0d825238'
AND event_name = 'DepositCreated'
AND block_timestamp::date >= '2024-06-01'
Last run: 2 days agoAuto-refreshes every 1 hour
1
9B
36s