Hadiseh(Total Last year)NFL ALL (THANKSGIVING) DAY 3
Updated 2022-12-07
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
›
⌄
with t1 as ( select date(timestamp) as date,
TOKEN,
avg(PRICE_USD) as price_usd
from flow.core.fact_prices
where token = 'Flow'
group by date,token),
t2 as ( select date(block_timestamp) as date,
tx_id,seller,buyer,currency,
case when currency ilike 'FLOW' then price*price_usd else price end as total_amount
from flow.core.ez_nft_sales x join flow.core.dim_allday_metadata y on x.nft_id = y.nft_id
left outer join t1 z on x.block_timestamp::date = z.date
where TX_SUCCEEDED = 'TRUE'
and NFLALLDAY_ID is not null)
select
case when date < '2022-11-25' then 'Pre Thanksgiving'
when date = '2022-11-25' then 'During Thanksgiving'
when date > '2022-11-25' then 'After Thanksgiving' end as type,
count(DISTINCT tx_id) as total_transaction,
count(DISTINCT buyer) as total_buyer,
count(DISTINCT seller) as total_seller,
sum(total_amount) as total_usd_vol,
min(total_amount) as min_vol,
avg(total_amount) as avg_vol,
max(total_amount) as max_vol
from t2
where date >= '2021-12-05'
group by type
Run a query to Download Data