bachiTotal nft sellers - Flow Vs. Eth Vs. Sol
    Updated 2022-07-19
    WITH flow
    AS ( select Round(Sum(a.price * b.price_usd), 2) AS volume_usd,
    Count(DISTINCT seller) AS sellers,
    'Flow' AS chain
    FROM flow.core.fact_nft_sales a
    JOIN flow.core.fact_prices b
    ON a.currency = b.token_contract
    WHERE tx_succeeded = 'TRUE'
    AND a.price > 0
    AND a.price IS NOT NULL
    GROUP BY 3),
    ethereum
    AS (SELECT Round(Sum(price_usd), 2) AS volume_usd,
    Count(DISTINCT seller_address) AS sellers,
    'Ethereum' AS chain
    FROM ethereum.core.ez_nft_sales
    WHERE price_usd IS NOT NULL
    AND price_usd > 0
    GROUP BY 3),
    solana
    AS (SELECT Round(Sum(sales_amount * 42.02), 2) AS volume_usd,
    Count(DISTINCT seller) AS sellers,
    'Solana' AS chain
    FROM solana.core.fact_nft_sales
    WHERE succeeded = 'TRUE'
    AND sales_amount > 0
    AND sales_amount IS NOT NULL
    GROUP BY 3)
    SELECT *
    FROM flow
    UNION
    SELECT *
    FROM ethereum
    Run a query to Download Data