kidaBuy per address
Updated 2022-01-24Copy Reference Fork
999
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
RE_events AS (
SELECT
block_timestamp,
tx_id,
event_attributes
FROM
terra.msg_events
WHERE event_attributes:action = 'execute_orders'
AND event_type = 'from_contract'
AND tx_status = 'SUCCEEDED'
),
RE_takers AS (
SELECT DISTINCT
tx_id,
msg_value:sender as taker
FROM
terra.msgs
WHERE
tx_id IN (SELECT DISTINCT tx_id FROM RE_events)
),
all_sales AS (
SELECT
*
FROM (
SELECT
block_timestamp,
tx_id,
'Random Earth' as platform,
action,
IFF(action = 'SELL', maker, taker) as nft_from,
IFF(action = 'ACCEPT BID', maker, taker) as nft_to,
nft_address,
Run a query to Download Data