saeedmzn[Pallet Exchange] - Total
Updated 2024-06-01
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
raw_prices AS (
SELECT
livequery.live.udf_api (
'https://flipsidecrypto.xyz/api/v1/queries/2c2ebd8f-fa1d-4328-bf69-cf0f793dcf03/data/latest'
) AS response
),
NFT_sales as (
select
block_timestamp::date date ,
tx_id,
BUYER_ADDRESS buyer,
SELLER_ADDRESS seller,
AMOUNT sale_price,
NFT_ADDRESS
from sei.nft.ez_nft_sales
where PLATFORM_NAME ='pallet'
and block_timestamp::date >= '2024-01-01'
),
sei_price as (
select
date_trunc(day,t.value:"DATE"::date)::date date ,
t.value :"PRICE"::float price ,
t.value:"VOLUME"::number trading_volume,
t.value:"MCAP"::number mcap
from
raw_prices ,
table(FLATTEN(parse_json(response:data))) t
)
,
overtime as (
select date_trunc(week,date)::date weekly ,
count (tx_id) num_sales ,
sum (SALE_PRICE) sales_volume ,
QueryRunArchived: QueryRun has been archived