wanlinCex Movement - 1. Ethereum - Last 24 Hours (Outflow) copy
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
›
⌄
ethereum.core.ez_token_transfersethereum.core.ez_nft_transfersethereum.core.ez_nft_transfers-- forked from pinehearst / Cex Movement - 1. Ethereum - Last 24 Hours (Outflow) @ https://flipsidecrypto.xyz/pinehearst/q/untitled-query-rcyAWq
with all_transfers AS (
select
block_timestamp,
tx_hash,
origin_from_address,
from_address,
to_address,
contract_address,
symbol,
amount,
amount_usd
from ethereum.core.ez_token_transfers
WHERE block_timestamp >'{{date}}'--
-- WHERE date(block_timestamp)>= CURRENT_DATE - INTERVAL '24 hours'-- Last n hours
union
select
block_timestamp,
tx_hash,
origin_from_address,
eth_from_address,
eth_to_address,
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' as contract_address, -- take weth price
'ETH' as symbol, -- 'ETH' but actually eth / for pricing missing tables
amount,
amount_usd
from ethereum.core.ez_eth_transfers
WHERE block_timestamp > '{{date}}'--
-- WHERE date(block_timestamp)>= CURRENT_DATE - INTERVAL '24 hours'-- Last n hours
),
eth_cex AS (
SELECT
block_timestamp,
from_address,
to_address,
Run a query to Download Data