Ranjit-Yadavx2y2 vs magiceden ok
    Updated 2022-09-29
    with price as (
    select
    hour::date as date_,
    avg(price) as price
    from flipside_prod_db.ethereum_core.fact_hourly_token_prices
    where token_address = lower('0xD31a59c85aE9D8edEFeC411D448f90841571b89c')
    and hour::date >= '2022-09-01'
    group by 1
    )
    select
    a.block_timestamp::date as date,
    'Magic Eden' as blockchain,
    count(DISTINCT PURCHASER) as unique_buyer,
    sum(unique_buyer) over (order by date asc) as cum_user,
    sum(SALES_AMOUNT * price) as volume,
    sum(volume) over (order by date asc) as cum_volume,
    count(distinct(tx_id)) as n_sales,
    sum(n_sales) over (order by date asc) as cum_sales
    from solana.core.fact_nft_sales a join price b on a.block_timestamp::date = b.date_
    where block_timestamp::date >= '2022-09-01'
    and marketplace in ('magic eden v1', 'magic eden v2')
    group by 1
    UNION
    select
    block_timestamp::date as date,
    'x2y2' as blockchain,
    count(DISTINCT BUYER_ADDRESS) as unique_buyer ,
    sum(unique_buyer) over (order by date asc) as cum_user,
    sum(PRICE_USD) as volume,
    sum(volume) over (order by date asc) as cum_volume,
    count(distinct(tx_hash)) as n_sales,
    sum(n_sales) over (order by date asc) as cum_sales
    from ethereum.core.ez_nft_sales
    Run a query to Download Data