saeedmznCumulative Transferred volume copy
Updated 2023-12-26
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
›
⌄
-- forked from Transferred volume @ https://flipsidecrypto.xyz/edit/queries/c2969a4d-97a1-4ce6-a234-b3cbb1e851ca
with contracts as (
select ADDRESS ,SYMBOL
from base.core.dim_contracts
group by 1 ,2
),
prices as (
select HOUR::date date , SYMBOL ,
TOKEN_ADDRESS , DECIMALS,
avg(price) price
from base.price.ez_hourly_token_prices
group by 1 , 2 ,3 ,4 order by 1
)
select
block_timestamp::date date ,
SYMBOL ,
sum ((RAW_AMOUNT/pow(10,DECIMALS))*price) volume_usd,
sum (volume_usd) over ( order by block_timestamp::date , symbol ) cum_volume_USD
from base.core.fact_token_transfers t join prices p on TOKEN_ADDRESS = CONTRACT_ADDRESS
and p.date =t.BLOCK_TIMESTAMP::date
group by 1 ,2 order by date
QueryRunArchived: QueryRun has been archived