superflyUntitled Query
    Updated 2022-10-19
    with MIN1 AS (SELECT
    tx_from as address,
    count(distinct tx_id) as NUMBER_OF_TRANSACTIONS,
    count(distinct date(block_timestamp)) as days_active,
    min(date(block_timestamp)) as first_tx,
    max(date(block_timestamp)) as last_tx,
    datediff('day', last_tx, getdate()) as days_last_active,
    datediff('day', first_tx, getdate()) as age_today
    FROM osmosis.core.fact_transactions
    group by 1),
    new_users AS (
    SELECT
    first_tx,
    count(distinct address) as "New Users",
    sum("New Users") over (order by first_tx) as "Cumulative New"
    FROM MIN1
    GROUP BY 1
    ),
    MIN2 AS (
    SELECT
    date(block_timestamp) as date,
    count(distinct tx_from) as "Distinct Wallets",
    count(distinct tx_id) as NUMBER_OF_TRANSACTIONS
    FROM osmosis.core.fact_transactions
    WHERE tx_status = 'SUCCEEDED'
    GROUP BY 1
    )
    SELECT
    *
    FROM MIN2
    LEFT JOIN New_Users ON first_tx = date
    ORDER BY 1 DESC
    Run a query to Download Data