DAY | PRICE | PRICE_30_DAYS_AGO | APY | |
---|---|---|---|---|
1 | 2025-03-21 00:00:00.000 | 1.163304001 | 1.161392429 | 4.291177827 |
2 | 2025-03-20 00:00:00.000 | 1.163209225 | 1.161174147 | 4.56928638 |
3 | 2025-03-19 00:00:00.000 | 1.163075991 | 1.160917686 | 4.847035273 |
4 | 2025-03-18 00:00:00.000 | 1.162949092 | 1.160617164 | 5.238307124 |
5 | 2025-03-17 00:00:00.000 | 1.162863434 | 1.160376822 | 5.586936554 |
6 | 2025-03-16 00:00:00.000 | 1.162709651 | 1.160110531 | 5.841060388 |
7 | 2025-03-15 00:00:00.000 | 1.162614891 | 1.159831008 | 6.257791994 |
8 | 2025-03-14 00:00:00.000 | 1.162488373 | 1.159571376 | 6.558482434 |
9 | 2025-03-13 00:00:00.000 | 1.162324666 | 1.159277499 | 6.852890386 |
10 | 2025-03-12 00:00:00.000 | 1.162199931 | 1.158961124 | 7.285862766 |
11 | 2025-03-11 00:00:00.000 | 1.162019601 | 1.158722078 | 7.419478076 |
12 | 2025-03-10 00:00:00.000 | 1.161865531 | 1.158456145 | 7.67293153 |
13 | 2025-03-09 00:00:00.000 | 1.161737552 | 1.158134902 | 8.110128727 |
14 | 2025-03-08 00:00:00.000 | 1.161539664 | 1.15785369 | 8.29971804 |
15 | 2025-03-07 00:00:00.000 | 1.161392429 | 1.157584629 | 8.576027666 |
16 | 2025-03-06 00:00:00.000 | 1.161174147 | 1.157369634 | 8.570218412 |
17 | 2025-03-05 00:00:00.000 | 1.160917686 | 1.157166528 | 8.451509799 |
18 | 2025-03-04 00:00:00.000 | 1.160617164 | 1.156966617 | 8.226252342 |
19 | 2025-03-03 00:00:00.000 | 1.160376822 | 1.156800835 | 8.059390781 |
20 | 2025-03-02 00:00:00.000 | 1.160110531 | 1.156569805 | 7.981515725 |
Pine Analyticsethena 2
Updated 2025-03-21
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 tab1 as (
SELECT
tx_hash as tx1,
block_timestamp as bt1,
amount as amt1
FROM ethereum.core.ez_token_transfers
WHERE CONTRACT_ADDRESS LIKE lower('0x9D39A5DE30e57443BfF2A8307A4256c8797A3497')
AND FROM_address LIKE lower('0x0000000000000000000000000000000000000000')
), tab2 as (
SELECT
tx_hash as tx2,
block_timestamp as bt2,
amount as amt2
FROM ethereum.core.ez_token_transfers
WHERE CONTRACT_ADDRESS LIKE lower('0x4c9EDD5852cd905f086C759E8383e09bff1E68B3')
AND to_address LIKE lower('0x9D39A5DE30e57443BfF2A8307A4256c8797A3497')
)
SELECT
*,
LAG(price, 14) OVER (ORDER BY day) as price_30_days_ago,
(((price - price_30_days_ago) / price_30_days_ago) * (365/14)) * 100 as apy
FROM (
SELECT
date(bt1) as day,
median(amt2 / amt1) as price
FROM tab1
LEFT outer JOIN tab2
on tx1 = tx2
GROUP BY 1
)
Last run: about 1 month ago
...
477
28KB
10s