kidaAcross Volume By Category
Updated 2023-01-03Copy Reference Fork
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
›
⌄
with
weth_prices as (
select
date(hour) as date,
decimals,
symbol,
token_address,
avg(price) as price
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
group by date, decimals, symbol, token_address
),
eth_prices as (
select
date(hour) as date,
decimals,
symbol,
token_address,
avg(price) as price
from ethereum.core.fact_hourly_token_prices
group by date, decimals, symbol, token_address
),
eth_token_volume as (
select
block_timestamp::date as date,
tx_hash,
'0x' || substr(topics[2], 1 + 2 + 24, 40) as token_address,
'0x' || substr(topics[3], 1 + 2 + 24, 40) as user_address,
tokenflow_eth.hextoint(substr(data, 1 + 2 + 64 * 0, 64)) as amount
from ethereum.core.fact_event_logs
where topics[0] = '0x4a4fc49abd237bfd7f4ac82d6c7a284c69daaea5154430cff04ad7482c6c4254' -- FundsDeposited
and tx_status = 'SUCCESS'
),
Run a query to Download Data