0xaimanUntitled Query
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
›
⌄
with holder as (select address, count(distinct asset_id) as n from algorand.account_asset where asset_name like 'Warrior Croc%' and amount >0 group by 1),
sales as (
select a.address,c.asset_id,c.asset_name, b.block_timestamp as t, a.balance from algorand.account a
inner join algorand.block b on a.created_at=b.block_id
inner join algorand.account_asset c on a.address=c.address
inner join algorand.asset d on d.asset_id=c.asset_id
inner join holder on holder.address=a.address
where c.asset_name like 'Warrior Croc%' and (d.creator_address = 'A62XRVE7ZWSXLAA4YDDI7GUMCHML2TT3JXFT3OWTVQAKOZSBGNT7FX5YQU' or d.creator_address = 'SRRIUGPVPPGST3KPH32XQXTE567G6LHCEX2IMHDRW2IWH3427UVWXRXHCQ')
),
table1 as ( select distinct address, balance from sales )
select address, balance, case when balance=0 then '0 ALGO'
when balance>=1 and balance<=1000 then '1 to 1,000 ALGO'
when balance>1000 and balance<=10000 then '1,001 to 10,000 ALGO'
when balance>10000 and balance<=100000 then '10,001 to 100,000 ALGO'
when balance>100000 and balance<=1000000 then '100,000 to 1,000,000 ALGO'
else 'More than 1 M ALGO'
end as portfolio
from table1
limit 100
Run a query to Download Data