barbodalgooooooooo1
Updated 2022-03-12
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 to_dex as (
SELECT
BLOCK_TIMESTAMP::date as dt,
sum(amount) as Algo_amount
FROM algorand.payment_transaction
where block_timestamp >= '2022-02-10' AND block_timestamp <= '2022-02-17'
and amount is not null
and sender in (select address from algorand.labels where LABEL_TYPE = 'cex' )
and receiver not in (select address from algorand.labels where LABEL_TYPE = 'cex')
group by dt
order by dt
),
to_cex as (
SELECT
BLOCK_TIMESTAMP::date as dt1,
sum(amount) as Algo_amount1
FROM algorand.payment_transaction
where block_timestamp >= '2022-02-10' AND block_timestamp <= '2022-02-17'
and amount is not null
and RECEIVER in (select address from algorand.labels where LABEL_TYPE = 'cex' )
and SENDER not in (select address from algorand.labels where LABEL_TYPE = 'cex')
group by dt1
order by dt1
)
select
d.dt as timeframe,
round(d.Algo_amount) as to_dex,
round(c.Algo_amount1) as to_cex
from to_dex d join to_cex c on d.dt = c.dt1
group by 1,2,3
order by 1
Run a query to Download Data