Hessishxdefi-pol- weekly # of new vs existing users
Updated 2024-12-31
999
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 swap_multi as (SELECT DISTINCT tx_hash as hash, ORIGIN_FROM_ADDRESS as swapper,count(*) as steps
from polygon.defi.ez_dex_swaps
where --tx_hash = '0x89a3e55cf2b71170881b3a1040d62baa5816a01a71cc74ad7d7b42976768d691'
BLOCK_TIMESTAMP::date >= '2023-10-01' and
ORIGIN_TO_ADDRESS in ('0xa2a42b7203b2dc0199b81039c6c4e1ef900e82a4','0xd2667072a2a30e8c21fa276b474fd047ab5ff0f7')
and ORIGIN_from_ADDRESS not in ('0x1e2c53ba467f6c4aa9325a7767a401b1999b2bf7',
'0x90ab3b8deeaa6a3cfa3c6622f140ce56e62f47e3',
'0x36e7556a3c68876387ad02196b7e125e73939115',
'0xf91e863dcc42a81536695b2e6497797935ee5b95')
GROUP by all
having steps > 1),
swap_single as (SELECT DISTINCT tx_hash as hash, ORIGIN_FROM_ADDRESS as swapper,count(*) as steps
from polygon.defi.ez_dex_swaps
where --tx_hash = '0x89a3e55cf2b71170881b3a1040d62baa5816a01a71cc74ad7d7b42976768d691'
BLOCK_TIMESTAMP::date >= '2023-10-01' and
ORIGIN_TO_ADDRESS in ('0xa2a42b7203b2dc0199b81039c6c4e1ef900e82a4','0xd2667072a2a30e8c21fa276b474fd047ab5ff0f7')
and ORIGIN_from_ADDRESS not in ('0x1e2c53ba467f6c4aa9325a7767a401b1999b2bf7',
'0x90ab3b8deeaa6a3cfa3c6622f140ce56e62f47e3',
'0x36e7556a3c68876387ad02196b7e125e73939115',
'0xf91e863dcc42a81536695b2e6497797935ee5b95')
GROUP by all
having steps = 1),
side_a as (
SELECT BLOCK_TIMESTAMP::date as time_a,
TX_HASH as tx_a,
FROM_ADDRESS as swapper_a,
SYMBOL as from_token,
case when AMOUNT_USD is null then 0 else AMOUNT_USD end as amount_a
from polygon.core.ez_token_transfers
join swap_multi on tx_hash = hash and
QueryRunArchived: QueryRun has been archived