SniperRe8-2
Updated 2022-10-29
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
›
⌄
with Base as (
select block_timestamp,
tx_hash,
event_inputs:to as Buyer,
event_inputs:from as Seller,
event_inputs:Token_ID as Token_ID
from polygon.core.fact_event_logs
where block_timestamp::date between '2022-06-23' and '2022-09-23'
and event_inputs:tokenId is not null
and event_name = 'Transfer'
and tx_status = 'SUCCESS'
and event_inputs:from != '0x0000000000000000000000000000000000000000'
and event_inputs:to != '0x0000000000000000000000000000000000000000'
and contract_address = '0x9d305a42a3975ee4c1c57555bed5919889dce63f')
select ' SandBox' as collection,
date_trunc('DAy', block_timestamp) Date,
count (distinct tx_hash) as Sales_Count,
count (distinct buyer) as Buyers_Count,
count (distinct Seller) as Sellers_Count,
count (distinct Token_ID) as Tokens_Count,
sum (sales_count) over (order by date) as Cum_Sales_Count,
sum (Buyers_Count) over (order by date) as Cum_Buyers_Count,
sum (Sellers_Count) over (order by date) as Cum_Sellers_Count,
sum (Tokens_Count) over (order by date) as Tokens_Count
from Base
group by 1,2
Run a query to Download Data