MahrooUntitled Query
    Updated 2022-11-02
    with minttable as (
    select count (distinct tx_hash) as TX_Count,
    count (distinct nft_to_address) as Minters_Count,
    count (distinct tokenid) as Minted_Tokens,
    sum (mint_price_usd) as Volume,
    avg (mint_price_usd) as Average_Volume,
    min (mint_price_usd) as min_Volume,
    max (mint_price_usd) as max_Volume
    from ethereum.core.ez_nft_mints
    where nft_address = '0x60bb1e2aa1c9acafb4d34f71585d7e959f387769'),

    maintable as (
    select count (distinct tx_hash) as Sales_Count,
    count (distinct buyer_address) as Buyers_Count,
    count (distinct seller_address) as Sellers_Count,
    count (distinct nft_address) as Collections_Count,
    count (distinct tokenid) as Tokens_Count,
    (count (distinct tokenid)/10000)*100 as Sales_to_All_Ratio,
    sum (price_usd) as Total_USD_Volume,
    avg (price_usd) as Average_USD_Volume,
    median (price_usd) as Median_USD_Volume,
    min (price_usd) as Min_USD_Volume,
    max (price_usd) as Max_USD_Volume
    from ethereum.core.ez_nft_sales join minttable
    where nft_address in ('0x60bb1e2aa1c9acafb4d34f71585d7e959f387769')
    and price_usd > 0)

    select Sales_Count,
    Buyers_Count,
    Sellers_Count,
    Collections_Count,
    Tokens_Count,
    Sales_to_All_Ratio,
    (Tokens_Count/Minted_Tokens)*100 as Sales_To_Minted_Ratio,
    Total_USD_Volume,
    Average_USD_Volume,
    Run a query to Download Data