rajsGlasses
Updated 2022-06-20Copy Reference Fork
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 winners as
(
SELECT
tx_json:receipt:logs[0]:decoded:inputs:nounId::integer as nounid,
max(eth_value) as winner_bid_price
-- *
from flipside_prod_db.ethereum_core.fact_transactions
where to_address = '0x55e0f7a3bb39a28bd7bcc458e04b3cf00ad3219e'
and status = 'SUCCESS'
group by 1
)
,
mints as
(
SELECT
nounid,
eth_value as mint_price,
-- tr.*,
tx_hash,
block_timestamp
from flipside_prod_db.ethereum_core.fact_transactions t
right join winners w
on tx_json:receipt:logs[0]:decoded:inputs:nounId::integer = nounid
and eth_value = winner_bid_price
-- left join traits tr
-- on t.tx_hash = tr.tx_hash
where to_address = '0x55e0f7a3bb39a28bd7bcc458e04b3cf00ad3219e'
and status = 'SUCCESS'
and block_timestamp >= '2022-05-01'
)
,
secondary_sales AS
(
SELECT
Run a query to Download Data