OCTOPUSNEW wallet buys for the token
Updated 2023-12-02
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 fresh_wallet_traders AS (
SELECT from_address, MIN(block_timestamp) AS min_timestamp
FROM ethereum.core.fact_transactions
WHERE from_address IN (
SELECT trader
FROM crosschain.defi.ez_dex_swaps
WHERE block_timestamp > CURRENT_TIMESTAMP() - INTERVAL '7 day'
)
GROUP BY 1
HAVING MIN(block_timestamp) > CURRENT_TIMESTAMP() - INTERVAL '7 day'
),
fresh_wallet_buys AS (
SELECT
amount_out_usd AS buy,
block_timestamp,
trader,
tx_hash
FROM crosschain.defi.ez_dex_swaps
WHERE trader IN (SELECT from_address FROM fresh_wallet_traders)
AND amount_out_usd IS NOT NULL
AND blockchain = 'ethereum'
AND block_timestamp > CURRENT_TIMESTAMP() - INTERVAL '1 day'
AND token_out = '0x514910771af9ca656af840dff83e8264ecf986ca'
ORDER BY 1 DESC
)
SELECT DISTINCT
TO_VARCHAR(buy, '$999,999,999') AS "Amount Bought",
block_timestamp AS "Time",
trader AS "Trader",
tx_hash AS "Hash"
FROM fresh_wallet_buys
ORDER BY 1 DESC
LIMIT 250;
Run a query to Download Data