denze-e7j2NUSolana Segment Share
    Updated 2023-04-04
    select
    date_trunc('day', a.block_timestamp) as time_unit
    ,case
    when marketplace IN ('magic eden v2', 'Magic Eden') THEN 'magic eden'
    when marketplace IN ('coral cube', 'Coral Cube') THEN 'coral cube'
    ELSE marketplace
    END AS marketplace
    ,count(1) as sales_count
    ,sum(a.sales_amount) as sales_sol_amount
    ,sum(a.sales_amount * b.price) as sales_usd_amount
    from solana.core.fact_nft_sales a
    left join ethereum.core.fact_hourly_token_prices b on b.token_address ilike '0xD31a59c85aE9D8edEFeC411D448f90841571b89c'
    and b.hour = date_trunc('hour',a.block_timestamp)
    where a.block_timestamp >= current_date - interval '180 day'
    and a.block_timestamp < current_date
    group by 1,2
    order by 1,2
    Run a query to Download Data