kakamoraTop 10 NFTs
    Updated 2022-08-01
    WITH nft_sales as (
    SELECT
    logs.block_timestamp,
    logs.tx_hash,
    logs.contract_address as collection_addr,
    logs.event_inputs:from as seller,
    logs.event_inputs:to as buyer,
    txns.eth_value as sale_amount,
    NVL(lbl.address_name, 'Others') as nft_collection_name
    from optimism.core.fact_event_logs logs
    INNER JOIN optimism.core.fact_transactions txns using (tx_hash)
    INNER JOIN optimism.core.dim_labels lbl ON lbl.address = logs.contract_address
    where logs.origin_to_address in ('0x3f9da045b0f77d707ea4061110339c4ea8ecfa70',
    '0x20975da6eb930d592b9d78f451a9156db5e4c77b',
    '0x065e8a87b8f11aed6facf9447abe5e8c5d7502b6')
    and logs.event_name = 'Transfer'
    and logs.event_inputs:to = origin_from_address
    and logs.event_removed = false
    and sale_amount > 0
    )
    SELECT
    tx_hash,
    nft_collection_name,
    sale_amount
    FROM nft_sales
    ORDER BY sale_amount DESC
    LIMIT 10

    Run a query to Download Data