saeedmznNFT Wallet Behavior Comparison - sales over time
    Updated 2022-07-18
    with price_sol as (
    select
    BLOCK_TIMESTAMP::date as date ,
    avg( SWAP_TO_AMOUNT/SWAP_FROM_AMOUNT) as price
    from solana.core.fact_swaps join solana.core.dim_labels
    on ADDRESS = SWAP_FROM_MINT
    where SWAP_FROM_MINT = 'So11111111111111111111111111111111111111112'-- SOL
    and SWAP_TO_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' --usDC
    and SWAP_FROM_AMOUNT >0
    group by 1 order by date
    ),
    price_ETH as (
    select hour::date as date,
    avg(price) as price
    from ethereum.core.fact_hourly_token_prices
    where symbol ='WETH'
    group by 1),
    price_FLOW as (
    select TIMESTAMP::date as date,
    avg(price_usd) as price
    from flow.core.fact_prices
    where symbol ='FLOW'
    and source ='coingecko'
    group by 1),
    NFT_flow_tx_ids as (
    select
    block_timestamp::date as date,
    tx_id ,
    buyer,
    seller,
    case when currency ='A.1654653399040a61.FlowToken' then (s.price * p.price)
    else s.price
    end as nft_price
    from flow.core.fact_nft_sales s join price_FLOW p on block_timestamp::date = (date)
    where tx_succeeded ='true'
    Run a query to Download Data