mamad-5XN3k3Kaia vs. Other Chains
Updated 2025-03-16Copy Reference Fork
999
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 klaypricet as (
Select
TO_TIMESTAMP(value[0]::string) as pdate,
value[1] as price
from (
SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/coins/klay-token/market_chart?vs_currency=usd&days=360&interval=daily&precision=3') as resp)
,LATERAL FLATTEN (input => resp:data:prices)
),
pricet as (
select
case
when TOKEN_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' then 'ETH'
when TOKEN_ADDRESS= '0x1fa4a73a3f0133f0025378af00236f3abdee5d63' then 'NEAR'
when TOKEN_ADDRESS= '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7' then 'AVAX'
when Token_ADDRESS= 'so11111111111111111111111111111111111111112' then 'SOL'
else symbol end as sym,
HOUR::date as pdate,
avg(price) as price
from crosschain.price.ez_prices_hourly
where
TOKEN_ADDRESS in ('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2','0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
'0x1fa4a73a3f0133f0025378af00236f3abdee5d63','so11111111111111111111111111111111111111112')
and hour::date >= '2024-09-01'
group by 1,2
),
aptprice as (
SELECT
TO_TIMESTAMP(value[0]::string) as pdate,
value[1] as price
from (
SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/coins/aptos/market_chart?vs_currency=usd&days=90&interval=daily&precision=3') as resp
QueryRunArchived: QueryRun has been archived