mamad-5XN3k3Untitled Query
    Updated 2022-10-25
    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