Flipside CommunityOptimism Wrapped (part 2)
    Updated 2025-02-04
    -- forked from 4.B) Categorical stats @ https://flipsidecrypto.xyz/edit/queries/b2e12005-9ef5-49ab-be39-abf39921d205

    with acquired_users as (
    select distinct from_address from optimism.core.fact_transactions
    where block_timestamp::date >='2023-01-01' and block_timestamp::date < '2024-01-01'
    and nonce=1
    ),
    acquired_users_transactions AS (
    select ft.* from optimism.core.fact_transactions ft
    inner join acquired_users nu
    on ft.from_address=nu.from_address
    ),
    swapper as
    (
    select distinct origin_from_address from optimism.defi.ez_dex_swaps
    where block_timestamp::date >='2023-01-01' and block_timestamp::date < '2024-01-01'
    ),
    -- nft_minter as
    -- (
    -- select distinct nft_to_address from optimism.nft.ez_nft_mints
    -- where block_timestamp::date >='2023-01-01' and block_timestamp::date < '2024-01-01'
    -- ),
    nft_buyer as
    (
    select distinct buyer_address from optimism.nft.ez_nft_sales
    where block_timestamp::date >='2023-01-01' and block_timestamp::date < '2024-01-01'
    ),
    nft_seller as
    (
    select distinct seller_address from optimism.nft.ez_nft_sales
    where block_timestamp::date >='2023-01-01' and block_timestamp::date < '2024-01-01'
    )


    (
    select 'DEX swappers' as type, count(distinct nu.from_address) as number_of_users
    Last run: 3 months ago
    TYPE
    NUMBER_OF_USERS
    1
    DEX swappers1204401
    2
    NFT buyers97406
    3
    NFT sellers47056
    3
    69B
    73s