farid-c9j0VMA-TOP10-after-t
Updated 2022-12-05
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
›
⌄
with price as (
select
timestamp::date as day,
avg(price_usd) as flow_price
from flow.core.fact_prices
where token_contract = 'A.1654653399040a61.FlowToken'
group by 1
),
base as (
select
*,
case
when currency in ('A.ead892083b3e2c6c.FlowUtilityToken', 'A.1654653399040a61.FlowToken') then price * flow_price else price end as nft_price
from flow.core.ez_nft_sales join price on block_timestamp::date = day
where
nft_collection = 'A.e4cf4bdc1751c65d.AllDay' and tx_succeeded = 'TRUE'
)
select
buyer,
count(distinct tx_id) as sales_count,
sum(nft_price) as sale_volume,
rank() over(order by sales_count desc) as rank
from base
where block_timestamp >= '2022-11-24' and block_timestamp <='2022-12-01'
group by 1
order by 2 desc
limit 10
Run a query to Download Data