talebimorteza_72Untitled Query
Updated 2022-03-10
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
›
⌄
with
addressofcex as (
select distinct
address,
label,
label_subtype,
address_name
from algorand.labels
where label_type = 'cex' and label not like '%group%'
),
transfers as (
select
block_timestamp,
tx_id,
sender,
receiver,
amount,
label as cex,
case when p.receiver=c.address then 'to cex'
else 'from cex' end as type
from algorand.payment_transaction p join addressofcex c on p.sender=c.address
where block_timestamp >= '2022-02-06'
)
select
date(block_timestamp) as date,
cex,
count(tx_id) as transactionperday ,
sum(amount) as volume
from transfers
where type = 'from cex'
group by 1, 2
order by date