CoinConverseQuixotic NFT Dashboard top nft colleection
    Updated 2022-08-02
    with price_table as (select hour as dt, 'OP' as symbol, price
    from optimism.core.fact_hourly_token_prices
    where symbol in ('OP')
    union
    select hour as dt, 'ETH' as symbol, price
    from ethereum.core.fact_hourly_token_prices
    where symbol in ('WETH')),

    quixotic_nft as (select date_trunc('hour', s.block_timestamp) as dt, s.nft_address,
    case when s.currency_address = '0x4200000000000000000000000000000000000042' then 'OP' else s.currency_address end as symbol,
    d.project_name, s.tx_hash, s.seller_address, s.buyer_address, s.price
    from optimism.core.ez_nft_sales s
    join optimism.core.dim_labels d on
    s.nft_address = d.address
    where event_type = 'sale' and platform_name = 'quixotic'),

    quixotic_nft_daily as (select n.dt, n.symbol, n.project_name, tx_hash, buyer_address, (n.price*p.price) as nft_sales_usd
    from quixotic_nft n
    left join price_table p on
    n.dt = p.dt and n.symbol = p.symbol)

    select project_name, sum(nft_sales_usd) as total_nft_sales_usd
    from quixotic_nft_daily
    group by 1
    order by total_nft_sales_usd desc
    limit 10


    Run a query to Download Data