ArioNFT world cup - overall - 2
    Updated 2022-11-30
    ------Ethereum
    with Ethereum as (
    select
    block_timestamp,
    tx_hash,
    buyer_address as buyer,
    platform_name as marketplace,
    nft_address,
    project_name as Collection_name,
    tokenid,
    price_usd as amount_usd
    from ethereum.core.ez_nft_sales
    where 1=1
    and block_timestamp::date >= current_date - {{Period}}
    and origin_from_address != '0x0000000000000000000000000000000000000000'
    and origin_to_address != '0x0000000000000000000000000000000000000000'
    and price_usd > 0
    and price_usd is not null
    ),
    ----- FLOW
    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::date >= current_date - {{Period}}
    group by 1, 2
    ),
    Flow_nft_sales_table_1 as ( --- stablecoin payment
    select
    block_timestamp,
    tx_id as tx_hash,
    buyer,
    Run a query to Download Data