drone-mostafayawww
Updated 2022-09-28Copy 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
base as (
WITH
userss as (
select 'buyers' as type ,PURCHASER, BLOCK_TIMESTAMP from solana.core.fact_nft_sales
UNION ALL
select 'sellers' as type ,SELLER , BLOCK_TIMESTAMP from solana.core.fact_nft_sales )
select
MARKETPLACE,
mint,
sales_amount,
tx_id,
block_timestamp as Datea
from solana.core.fact_nft_sales
where Datea >= CURRENT_DATE -90 and Datea < CURRENT_DATE and succeeded = 'TRUE'
),
Top10 as (select
contract_name,
sum(sales_amount) as Volume
from solana.core.fact_nft_sales a
join solana.core.dim_nft_metadata b on a.mint = b.mint
where block_timestamp >= CURRENT_DATE -90 and block_timestamp < CURRENT_DATE
and succeeded = 'TRUE'
and marketplace in ('yawww')
group by 1
order by 2 desc
limit 10)
select
date_trunc ('day', Datea) as Date,
sum(sales_amount) as Volume,
count(distinct(tx_id)) as Txn,
Run a query to Download Data