SocioCryptoFlow Retention - NFT - all - 6 month
    Updated 2023-11-07
    WITH ranked as (
    SELECT *, rank()over(partition by buyer ORDER BY block_timestamp) as rank
    FROM flow.core.ez_nft_sales
    ),
    last_txns as (
    SELECT buyer,
    max(block_timestamp) as last_txn
    FROM flow.core.ez_nft_sales
    GROUP BY buyer
    ),
    eth_ranked as (
    SELECT *, rank()over(partition by buyer_address ORDER BY block_timestamp) as rank
    FROM ethereum.core.ez_nft_sales
    ),
    eth_last_txns as (
    SELECT buyer_address,
    max(block_timestamp) as last_txn
    FROM ethereum.core.ez_nft_sales
    GROUP BY buyer_address
    ),
    sol_ranked as (
    SELECT block_timestamp, purchaser as from_address, rank()over(partition by from_address ORDER BY block_timestamp) as rank
    FROM solana.core.fact_nft_sales),
    sol_last_txns as (
    SELECT purchaser as from_address,
    max(block_timestamp) as last_txn
    FROM solana.core.fact_nft_sales
    GROUP BY from_address
    ),
    algo_ranked as (
    SELECT *, rank()over(partition by purchaser ORDER BY block_timestamp) as rank
    FROM algorand.nft.ez_nft_sales
    ),
    algo_last_txns as (
    SELECT purchaser,
    max(block_timestamp) as last_txn
    Run a query to Download Data