datavortexultimate-moccasin
Updated 2025-02-07
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
›
⌄
⌄
SELECT DISTINCT contract_name, contract_address,
(decoded_log:assets[1])/1e18 AS deposit_amount,
tx_hash, block_timestamp
FROM swell.core.ez_decoded_event_logs
WHERE event_name = 'Deposits'
/*
WITH deposits AS (
SELECT DISTINCT
contract_name,
contract_address,
(decoded_log:assets[1]) AS deposit_amount,
tx_hash,
block_timestamp
FROM swell.core.ez_decoded_event_logs
WHERE event_name = 'Deposits'
),
prices AS (
SELECT
LOWER(name) AS name,
LOWER(symbol) AS symbol,
date_trunc('hour', hour) AS hour,
price,
decimals
FROM ethereum.price.ez_prices_hourly
WHERE LOWER(symbol) ILIKE '%swell%'
)
SELECT
COUNT(DISTINCT d.tx_hash) AS total_deposit_transactions,
COUNT(DISTINCT d.contract_address) AS total_depositors,
SUM(d.deposit_amount) AS total_eth_deposited,
SUM(
CASE
WHEN LOWER(p.symbol) = 'swell'
QueryRunArchived: QueryRun has been archived