chispasYOYOO helius json parse
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 Sol_Price as (
select
date_trunc(day, RECORDED_HOUR) as date,
avg(CLOSE) as price
from solana.core.fact_token_prices_hourly
where
RECORDED_HOUR::date >= current_date - 30
and SYMBOL ilike 'sol'
group by 1
),
buy as (
select
BLOCK_TIMESTAMP,
PURCHASER,
MINT as NFT_ADDRESS,
SALES_AMOUNT * price as Buy_Price
from solana.core.fact_nft_sales join Sol_Price on BLOCK_TIMESTAMP::date = date
where BLOCK_TIMESTAMP::date >= current_date - 30
and SALES_AMOUNT is not null
and SUCCEEDED
),
sell as (
select
BLOCK_TIMESTAMP,
SELLER,
MINT as NFT_ADDRESS,
SALES_AMOUNT * price as Sell_Price
from solana.core.fact_nft_sales join Sol_Price on BLOCK_TIMESTAMP::date = date
where BLOCK_TIMESTAMP::date >= current_date - 30
and SALES_AMOUNT is not null
and SUCCEEDED
)
,
Net as (
select
seller as Trader,
Run a query to Download Data