MahrooUntitled Query
    Updated 2022-11-02
    with table1 as (
    select buyer_address,
    count (distinct tx_hash) as TX_Count,
    sum (price_usd) as Total_Volume
    from ethereum.core.ez_nft_sales
    where nft_address = '0x60bb1e2aa1c9acafb4d34f71585d7e959f387769'
    group by 1),

    table2 as (select count (distinct buyer_address) as Buyers_Count from table1),

    table3 as (
    select t1.buyer_address,
    t2.nft_address,
    project_name
    from table1 t1 left join ethereum.core.ez_nft_sales t2 on t1.buyer_address = t2.buyer_address
    where project_name is not null),
    table4 as (
    select project_name,
    count (distinct buyer_address) as Non_Buyers_Count
    from table3
    where nft_address != '0x60bb1e2aa1c9acafb4d34f71585d7e959f387769' and project_name != 'opensea'
    group by 1)


    select project_name,
    (Non_Buyers_Count/Buyers_Count)*100 as Crossover_Ratio
    from table4,table2
    order by 2 desc
    limit 10
    Run a query to Download Data