mamad-5XN3k3Untitled Query
Updated 2022-10-25
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 flowpricet as (
select TIMESTAMP::date as date, avg(price_usd) as flowprice
from flow.core.fact_prices
where symbol ='FLOW' and source ='coinmarketcap'
group by 1),
nearpricet as (
select TIMESTAMP::date as date , avg(price_usd) as nearprice
from near.core.fact_prices
where symbol ilike'wNEAR' and date >= current_date - 90
group by 1),
TX AS (
SELECT
blocK_timestamp,
tx_hash,
tx:receipt as receipt,
tx:public_key as public_key,
tx:signer_id as signer_id,
tx:receiver_id as receiver_id
FROM near.core.fact_transactions
WHERE block_timestamp::date >= current_date - 90),
JSON_PARSING AS (
SELECT
block_timestamp,
tx_hash,
public_key,
signer_id,
receiver_id,
seq,key,path,index,
replace(value:outcome:logs[0], '\\') as logs,
check_json(logs) as checks
FROM tx,
table(flatten(input => receipt))
Run a query to Download Data