headitmanagerNumber of NFDs
Updated 2022-06-23
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 nfd as (select asset_id from algorand.asset where asset_name like '%.algo%')
,tx_ids as (select distinct tx_id from algorand.transactions inner join nfd on nfd.asset_id=algorand.transactions.asset_id)
,sold as (select sum(tx_message:txn:amt/pow(10,6)) from algorand.transactions inner join tx_ids
on tx_ids.tx_id=algorand.transactions.tx_id
where tx_type_name='payment')
,sold_overtime as (select sum(tx_message:txn:amt/pow(10,6)),block_timestamp::date from algorand.transactions inner join tx_ids
on tx_ids.tx_id=algorand.transactions.tx_id
where tx_type_name='payment'
group by block_timestamp::date)
,wallets_bought as (select count(distinct sender) from algorand.transactions inner join tx_ids
on tx_ids.tx_id=algorand.transactions.tx_id where tx_type_name='payment')
,wallets_bought_overtime as (select count(distinct sender),block_timestamp::date from algorand.transactions inner join tx_ids
on tx_ids.tx_id=algorand.transactions.tx_id where tx_type_name='payment'
group by block_timestamp::date)
,purchased as (select sum(amount) as purch ,address ,
case
when purch=1 then '1NFD'
when purch>1 and purch<=10 then '2 to 10 NFD'
when purch>10 and purch<=50 then '11 to 50 NFD'
when purch>50 then '50 to ... NFD' end as distribution
from algorand.account_asset inner join nfd on nfd.asset_id= algorand.account_asset.asset_id
and amount>0
group by address
order by purch desc )
,distribution as (select sum(TX_MESSAGE:txn:amt/1e6) as sm ,sender,
case
when sm<=100 then '0 to 100 ALGO'
when sm>100 and sm<=1000 then '100 to 1000 ALGO'
when sm>1000 and sm<=10000 then '1000 to 10000 ALGO'
when sm>10000 then '10000 to ... ALGO' end as distribution
from algorand.transactions inner join tx_ids
on tx_ids.tx_id=algorand.transactions.tx_id
Run a query to Download Data