0xHaM-dtoken Out in $USD
Updated 2022-10-28Copy Reference Fork
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 price as (
SELECT
HOUR::date as p_date,
symbol,
avg(price) as price_usd
FROM ethereum.core.fact_hourly_token_prices
WHERE symbol ilike any ('luna', 'WETH', 'axl', 'ratom', 'ngm', 'inj', 'dot')
AND HOUR::date >= '2022-01-01'
group by 1,2
order by 1
)
,top10 as (
SELECT
currency,
sum(amount/pow(10,decimal)) as amount
FROM axelar.core.fact_transfers
WHERE TRANSFER_TYPE = 'IBC_TRANSFER_IN'
AND (amount/pow(10,decimal)) is not null
AND TX_SUCCEEDED = 'TRUE'
group by 1
order by 2 DESC
limit 10
)
, bridge as (
select
BLOCK_TIMESTAMP,
CASE when CURRENCY = 'ungm' then 'NGM'
when CURRENCY = 'dot-planck' then 'DOT'
WHEN CURRENCY = 'inj' THEN 'INJ'
WHEN CURRENCY = 'weth-wei' THEN 'WETH'
WHEN CURRENCY = 'atom' THEN 'rATOM'
WHEN CURRENCY = 'uluna' THEN 'LUNA'
WHEN CURRENCY = 'uaxl' THEN 'AXL'
else CURRENCY end as asset,
tx_id,
sender,
Run a query to Download Data