Yousefi_1994 World Cup Round of 16 - 5. New and Old Buyer
    Updated 2023-05-07

    -------------------------------Parameters-------------------------------

    with fix_parameter as (
    select
    case
    when '{{Days}}' = 'All Time' then 20000
    when '{{Days}}' = 'Last 30 Days' then 30
    when '{{Days}}' = 'Last 60 Days' then 60
    when '{{Days}}' = 'Last 90 Days' then 90
    when '{{Days}}' = 'Last 180 Days' then 180
    when '{{Days}}' = 'Last 365 Days' then 365
    else 30
    end as time_frame
    ),

    -------------------------------Ethereum-------------------------------
    ethereum_nft_sales_results as (
    select
    block_timestamp,
    buyer_address as buyer
    from ethereum.core.ez_nft_sales
    where price_usd < 500000000
    and origin_from_address != '0x0000000000000000000000000000000000000000'
    and origin_to_address != '0x0000000000000000000000000000000000000000'
    and price_usd > 0 and price_usd is not null
    ),
    -------------------------------Algorand-------------------------------

    algorand_nft_sales_results as (
    select
    block_timestamp,
    purchaser as buyer
    from algorand.nft.ez_nft_sales
    Run a query to Download Data