pinehearstNEAR - The Arts District - NFT Users behaviour
Updated 2022-07-26
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 nft_txn AS (
SELECT
txn_hash,
method_name
FROM flipside_prod_db.mdao_near.actions_events_function_call
WHERE lower(method_name) LIKE ('%nft%')
),
address_stats AS (
SELECT
tx_signer,
count(txn_hash) as tx_counts,
count(distinct date(block_timestamp)) as days_active,
min(date(block_timestamp)) as first_tx,
max(date(block_timestamp)) as last_tx,
datediff('day', last_tx, getdate()) as last_active_days,
datediff('day', first_tx, getdate()) as age_today_days
FROM flipside_prod_db.mdao_near.transactions
GROUP BY 1
),
NFT_BUYERS AS (
SELECT
tx_signer as nft_buyers,
min(date(block_timestamp)) as first_buy_tx
FROM flipside_prod_db.mdao_near.transactions
WHERE txn_hash IN (SELECT txn_hash FROM nft_txn WHERE method_name = 'nft_buy') -- select tx
GROUP BY 1
ORDER BY 2 DESC
)
SELECT
a.block_timestamp,
a.txn_hash,
tx_receiver,
tx_signer,
action_name,
case when action_data:method_name LIKE '%nft%' then 1 else 0 end as nft_tx,
nvl(action_data:method_name, action_name) as method_name,
Run a query to Download Data