Afonso_DiazUntitled Query
Updated 2023-01-29
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 t1 as (
select
a.tx_id
from solana.core.fact_nft_sales a
left join solana.core.fact_nft_sales b
on a.purchaser = b.seller
and a.mint = b.mint
where a.succeeded = b.succeeded
and a.marketplace = b.marketplace
and a.marketplace = 'exchange art'
and a.succeeded = 1
),
t2 as (
select
b.tx_id
from solana.core.fact_nft_sales a
left join solana.core.fact_nft_sales b
on a.seller = b.seller
and b.block_timestamp > a.block_timestamp
and a.purchaser = b.purchaser
and a.mint = b.mint
where a.succeeded = b.succeeded
and a.marketplace = b.marketplace
and a.marketplace = 'exchange art'
and a.succeeded = 1
),
t3 as (
select distinct tx_id from t1
union
select distinct tx_id from t2
)
select
iff(tx_id in (select tx_id from t3), 'Wash Trading', 'Regular Trading') as type,
Run a query to Download Data