Moeglazglaz
Updated 2022-12-06
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 flow_price as (
select
timestamp::date as date,
token_contract,
avg(price_usd) as price
from flow.core.fact_prices
where 1=1
and token_contract in ('A.1654653399040a61.FlowToken', 'A.d01e482eb680ec9f.REVV')
and TIMESTAMP >= '2022-01-01'
group by 1, 2
),
Flow_nft_sales_table_1 as ( --- stablecoin payment
select
block_timestamp,
tx_id as tx_hash,
buyer,
CASE
when marketplace like '%.%' then split(MARKETPLACE, '.')[2]
else marketplace
end as marketplace,
nft_collection as Collection_name,
nft_id,
price as amount_USD
from flow.core.ez_nft_sales
where 1=1
and price is not null
and price > 0
and currency not in ('A.d01e482eb680ec9f.REVV', 'A.1654653399040a61.FlowToken')
and BLOCK_TIMESTAMP >= '2022-01-01'
and nft_collection = 'A.87ca73a41bb50ad5.Golazos'
and TX_SUCCEEDED = 'TRUE'
),
Flow_nft_sales_table_2 as (
select
block_timestamp,
tx_id as tx_hash,