kiacryptodaily tx and user count and cumulative tx count of both marketplace
Updated 2022-10-31Copy Reference Fork
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_prise as (
select
date_trunc('day', hour) as day,
avg(price) as sol_usd
from ethereum.core.fact_hourly_token_prices
where
token_address = '0xd31a59c85ae9d8edefec411d448f90841571b89c'
group by 1
),
hyper_base as (
select *
from solana.core.fact_nft_sales join sol_prise on block_timestamp::date = day
where
block_timestamp::date >= '2022-09-22' and
marketplace = 'hyperspace' and
succeeded = true
),
coral_base as (
select *
from solana.core.fact_nft_sales join sol_prise on block_timestamp::date = day
where
block_timestamp::date >= '2022-09-22' and
marketplace = 'coral cube' and
succeeded = true
)
select
date_trunc('day', block_timestamp) as date,
count(distinct tx_id) as sales_count,
count(distinct purchaser) as unique_buyer,
count(distinct seller) as unique_seller,
sum(sales_amount) * avg(sol_usd) as sales_volume_usd,
avg(sales_amount) * avg(sol_usd) as avg_nft_price_usd,
sum(sales_count) over (order by date) as cumulative_sales_count,
sum(sales_volume_usd) over (order by date) as cumulative_sales_volume_usd,
Run a query to Download Data