PawlusUNI Token - Deposits and Withdrawals by Exchange
Updated 2021-05-11
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 inflows as (
SELECT
date_trunc('day',block_timestamp) as date,
to_label as exchange,
sum(amount_usd) as deposits_usd
FROM ethereum.udm_events
WHERE
block_timestamp >= getdate() - interval '9 days'
and
((
to_label_type = 'cex'
and (from_label_type <> 'cex' OR from_label_type IS NULL)
) OR (
to_label_type = 'dex'
and (from_label_type <> 'dex' OR from_label_type IS NULL)
))
and contract_address = '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984'
GROUP BY 1,2
),
outflows as (
SELECT
date_trunc('day',block_timestamp) as date,
from_label as exchange,
sum(amount_usd) as withdrawals_usd
FROM ethereum.udm_events
WHERE
block_timestamp >= getdate() - interval '9 days'
and
((
from_label_type = 'cex'
and (to_label_type <> 'cex' OR to_label_type IS NULL)
) OR (
from_label_type = 'dex'
and (to_label_type <> 'dex' OR to_label_type IS NULL)
))
Run a query to Download Data