SocioAnalyticaFrom Aptos
Updated 2024-10-10
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
34
35
36
›
⌄
with prices as (
select
date_trunc('day', hour) as date,
token_address,
symbol,
median(price) as usd_price
from aptos.price.ez_prices_hourly
group by 1 , 2 , 3
union all
select
date_trunc('day', hour) as date,
token_address,
symbol,
median(price) as usd_price
from ethereum.price.ez_prices_hourly
where symbol IN ('USDT', 'WBTC', 'SOL','CELO','WBNB','WGLMR','WMATIC','WAVAX','SEI','SUI')
group by 1 , 2 , 3
)
,
base as (
select c.* ,
amount * usd_price as amount_usd
from (
select
block_timestamp,
tx_hash,
platform,
event_name,
direction,
sender,
receiver,
source_chain_id,
source_chain_name,
destination_chain_id,
destination_chain_name,
QueryRunArchived: QueryRun has been archived