Hossein2023-03-29 11:03 PM
Updated 2023-03-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
select
date_trunc('month', block_timestamp)::date as month,
marketplace,
count(distinct tx_id) as sales,
sum(price) as volume_usd,
avg(price) as average_volume_usd,
count(distinct buyer) as buyers,
sum(event_data:amount) as fees_flow,
avg(event_data:amount) as average_fees_flow,
sum (sales) over (partition by marketplace order by month) as cumulative_sales,
sum (fees_flow) over (partition by marketplace order by month) as cumulative_fees_flow,
sum (volume_usd) over (partition by marketplace order by month) as cumulative_volume_usd
from flow.core.ez_nft_sales a
join flow.core.fact_events c
using(tx_id)
left join flow.core.dim_contract_labels d
on nft_collection = d.event_contract
where d.event_contract = 'A.e3ad6030cbaff1c2.DimensionX'
and tx_succeeded = 1
and event_type = 'FeesDeducted'
group by 1, 2
order by 1
Run a query to Download Data