PapasotTiger Chi sales & volume
Updated 2023-01-03
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 Tigers as (
select *
from algorand.asset
where ASSET_NAME like '%Tiger Chi #%' or asset_name like '%TigerChi Special #%'
and ASSET_DELETED= false
order by asset_name),
group_transactions as (
select
tx_group_id,
asset_name
from algorand.asset_transfer_transaction
left join Tigers b using (asset_id)
where asset_amount = '1'
and ASSET_NAME like '%Tiger Chi #%' or asset_name like '%TigerChi Special #%'
and tx_group_id is not null
)
SELECT
date_trunc('day',block_timestamp) as block_day,
count(DISTINCT(c.tx_group_id)) sales,
sum(amount) as volume,
CASE
when asset_name like '%TigerChi Special #%' then 'TigerChi'
when asset_name like '%Tiger Chi #%' then 'Special'
end as generation
from algorand.transfers
left join group_transactions c using (tx_group_id)
where
asset_id = 0 AND
c.tx_group_id is not null
and generation is not null
group by block_day,generation
order by block_day
Run a query to Download Data