yasmin-n-d-r-hDistribution of Sales Volume on Marketplaces
    Updated 2022-11-30
    with yoots as (
    select
    *
    from
    solana.core.dim_labels
    where
    label = 'y00ts: mint t00bs'
    ),
    SOLPricet as (
    select
    block_timestamp :: date as day,
    avg (
    swap_to_amount / swap_from_amount
    ) as SOLprice
    from
    solana.fact_swaps
    where
    swap_from_mint = 'So11111111111111111111111111111111111111112' --SOL
    and swap_to_mint in (
    'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
    'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
    ) --USDC,USDT
    and swap_to_amount > 0
    and swap_from_amount > 0
    and succeeded = 'TRUE'
    group by
    1
    )
    select
    marketplace,
    address_name,
    count (distinct tx_id) as Sales_Count,
    count (distinct mint) as Tokens_Count,
    count (distinct purchaser) as Buyers_Count,
    count (distinct seller) as Sellers_Count,
    sum (sales_amount) as Total_SOL_Volume,
    Run a query to Download Data