brian-terraGalactic Angel Sales
Updated 2022-04-07Copy 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)
),
allSales AS
(
SELECT
block_timestamp,
tx_id,
platform,
nft_from,
nft_to,
nft_address,
amount,
denom,
tokenid
FROM (
Run a query to Download Data