Kaskoazul10 Popular CEX Sent to WEEKLY
Updated 2022-02-22
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 CEX_ADDRESS AS (
SELECT
address,
label
FROM
algorand.labels
WHERE
label_type = 'cex'
),
SENT_TO_CEX AS (
SELECT
p.block_timestamp::date as fecha,
p.receiver as Cex_address,
c.label as Cex_label,
p.amount as Sent_amount
FROM
algorand.payment_transaction p
INNER JOIN CEX_ADDRESS c
ON p.receiver = c.address
WHERE
p.block_timestamp >= '2021-01-01'
)
SELECT
date_trunc('WEEK', fecha),
Cex_label,
sum(Sent_amount)
FROM
SENT_TO_CEX
WHERE
Cex_label in ('binance', 'kraken', 'coinbase', 'okex', 'group1', 'huobi', 'group25', 'algorand exchange 5', 'group6', 'group27')
GROUP BY 1,2
ORDER BY 3 DESC
Run a query to Download Data