jackguyPEPE token Holders 1 copy
Updated 2023-04-24
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
-- forked from PEPE token Holders 1 @ https://flipsidecrypto.xyz/edit/queries/2998957a-dbe8-4210-833a-d5f04cc5c643
with tab1 as (
SELECT DISTINCT pool_address
from ethereum.uniswapv3.ez_swaps
WHERE token0_address LIKE lower('0x2F573070E6090b3264Fe707e2C9F201716F123c7')
OR token1_address LIKE lower('0x2F573070E6090b3264Fe707e2C9F201716F123c7')
)
SELECT --*
date_trunc('hour', block_timestamp) as hour,
count(DISTINCT TX_HASH) as swaps,
(sum(CASE when AMOUNT0_USD < 0 then AMOUNT0_USD * -1 else AMOUNT0_USD end) + sum(CASE when AMOUNT1_USD < 0 then AMOUNT1_USD * -1 else AMOUNT1_USD end))/2 as volume_usd, --,\
count(DISTINCT RECIPIENT) as traders,
median(CASE when TOKEN0_SYMBOL LIKE 'PEPE' then TOKEN0_PRICE else TOKEN1_PRICE end) as price_usd
from ethereum.uniswapv3.ez_swaps
WHERE POOL_ADDRESS in (SELECT * FROM tab1)
GROUP BY 1
--LIMIT 100
Run a query to Download Data