binhachonNEAR Tournament Round 1: The Arts District - #5
Updated 2022-07-27
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 paras_txs as (
select
distinct
txn_hash,
tx_signer as buyer
from flipside_prod_db.mdao_near.transactions
where 1=1 --txn_hash in ()
and substr(tx_receipt[0]:"outcome":"status",3,7) != 'Failure'
and tx_receiver = 'marketplace.paras.near'
),
paras_txs_1 as (
select
*
from flipside_prod_db.mdao_near.actions_events_function_call
where method_name = 'buy'
),
paras_txs_2 as (
select
block_timestamp,
buyer,
deposit/1e24 as price,
parse_json(args) as parsed_args,
parsed_args:nft_contract_id as nft_contract,
parsed_args:token_id as token_id
from paras_txs_1
inner join paras_txs on (paras_txs.txn_hash = paras_txs_1.txn_hash)
),
paras_txs_3 as (
select
nft_contract,
min(block_timestamp) as min_time
from paras_txs_2
group by 1
)
select
date_trunc('day', min_time) as time,
Run a query to Download Data