OneDataAnalystPercentage of Daily Active Users
    Updated 2022-10-19
    WITH t1 AS (
    SELECT DISTINCT Date_trunc('day',BLOCK_TIMESTAMP) AS Date, TX_FROM
    FROM osmosis.core.fact_transactions
    ),

    t2 AS (
    SELECT Date_trunc('week',date) AS week, TX_FROM, Count(*) AS Active_days
    FROM t1
    GROUP BY 1,2
    ),

    t3 AS(
    SELECT DISTINCT TX_FROM
    FROM t2
    WHERE Active_days >= 4 )

    SELECT 100*Count(*)/(SELECT COUNT(DISTINCT TX_FROM) FROM osmosis.core.fact_transactions)
    FROM t3
    Run a query to Download Data