flyingfishdelete Daily metrics copy
Updated 2024-04-18
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
›
⌄
-- forked from m3ji / Daily metrics @ https://flipsidecrypto.xyz/m3ji/q/OEJ8zRcFufEa/daily-metrics
WITH axl_price AS (
select
--date_trunc(day, HOUR) :: date as date,
hour as date,
TOKEN_ADDRESS,
avg(PRICE) as usd_price
from
crosschain.price.ez_hourly_token_prices
where hour::date BETWEEN '2023-08-21' and '2023-08-23'
group by
1,
2
-- date_trunc('day', recorded_hour) as day,
-- avg(price) as usd_price
-- FROM
-- osmosis.price.ez_prices
-- WHERE
-- symbol = 'AXL'
-- GROUP BY
-- 1
)
select
block_timestamp
, tx_hash
, sender
, axl.token_address
, amount
, axl.usd_price
, amount * axl.usd_price as value
FROM
axelar.defi.ez_bridge_satellite a
JOIN axl_price axl ON date_trunc(hour, block_timestamp) = axl.date
QueryRunArchived: QueryRun has been archived