shadilMagic Eden Whales - sell transactions per day
Updated 2022-04-09
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 buys as (
SELECT
purchaser::string as wallet,
sales_amount
FROM solana.fact_nft_sales
WHERE date(block_timestamp) >= '2022-03-01'
and(program_id = 'M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K'
or program_id = 'MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8')
),
sells as (
select
ZEROIFNULL(inner_instruction:instructions[0]:parsed:info:lamports/POW(10,9)) +
ZEROIFNULL(inner_instruction:instructions[1]:parsed:info:lamports/POW(10,9)) +
ZEROIFNULL(inner_instruction:instructions[2]:parsed:info:lamports/POW(10,9)) +
ZEROIFNULL(inner_instruction:instructions[3]:parsed:info:lamports/POW(10,9)) +
COALESCE (inner_instruction:instructions[4]:parsed:info:lamports/POW(10,9), 0)
AS sales_amount,
instruction:accounts[1]::string as wallet
from solana.fact_events
where date(block_timestamp) >= '2022-3-01'
AND (instruction:programId = 'MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8' or instruction:programId = 'M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K')
and array_size(inner_instruction:instructions) > 4
),
top_wallets as (
SELECT wallet, sum(sales_amount) as total_sale
from(
SELECT wallet,sales_amount from buys
UNION
SELECT wallet,sales_amount from sells
)
GROUP by wallet having total_sale > 0
ORDER BY total_sale desc
LIMIT 20
)
SELECT date(block_timestamp) as date,
Run a query to Download Data