nitsTop 10 Most Loss Making Addresses in the past n days
Updated 2022-11-19
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with buyer as
(SELECT buyer_address,tokenid as id , block_timestamp as purchase_time
from
ethereum.core.ez_nft_sales
where (nft_address ilike '0x959e104e1a4db6317fa58f8295f586e1a978c297' or nft_address ilike '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d')),
seller as
(SELECT seller_address,tokenid , block_timestamp as sale_time
from
ethereum.core.ez_nft_sales
where (nft_address ilike '0x959e104e1a4db6317fa58f8295f586e1a978c297' or nft_address ilike '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d'))
SELECT * from
( SELECT date(purchase_time) as day , avg(time_diff_days) as avg_holder_time from
(SELECT *, timestampdiff(sql_tsi_minute,purchase_time,sale_time )/(60*24) as time_diff_days from buyer
inner join seller
on seller_address = buyer_address and tokenid = id and purchase_time < sale_time)
GROUP by 1 )
where day >= CURRENT_DATE - {{n}}
-- LIMIT 10
Run a query to Download Data