messariaxelar_fees copy
Updated 2024-11-25
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
›
⌄
-- forked from travernorm_messari / axelar_fees @ https://flipsidecrypto.xyz/travernorm_messari/q/5O4zGe9OtAyv/axelar_fees
WITH transactions as (
SELECT *, date_trunc('day', block_timestamp) as date FROM axelar.core.fact_transactions
-- limit 5
)
, fees as (
SELECT DATE, FEE_DENOM , SUM(FEE)/1e6 as daily_fee
from transactions
group by 1,2
order by 1 DESC
)
-- ,axl_price as (
-- select * from crosschain.price.fact_hourly_token_prices
-- where provider ='coinmarketcap'
-- and token_address = '0x467719ad09025fcc6cf6f8311755809d45a5e5f3'
-- order by hour DESC
-- )
select * from fees
-- left join axl_price
-- on axl_price.hour = fees.date
order by date desc
QueryRunArchived: QueryRun has been archived