yasmin-n-d-r-hfirst action osmo
    Updated 2023-01-02
    with creation as (
    SELECT
    min(BLOCK_TIMESTAMP) as first_tx,
    TX_FROM
    from
    osmosis.core.fact_transactions
    GROUP by
    2
    ),
    full_data as (
    SELECT
    t.TX_FROM,
    first_tx,
    count(DISTINCT tx_id) as tx_counts,
    count(DISTINCT BLOCK_TIMESTAMP :: date) as days_active,
    count(
    DISTINCT date_trunc('week', BLOCK_TIMESTAMP)
    ) as weeks_active
    from
    osmosis.core.fact_transactions t
    JOIN creation c on c.TX_FROM = t.TX_FROM
    GROUP by
    1,
    2
    ),
    ---------------------------------------------------------------------------------------------------------------
    f_data as (
    SELECT
    TX_FROM,
    YEAR(BLOCK_TIMESTAMP) as year,
    week(BLOCK_TIMESTAMP) as week,
    COUNT(
    DISTINCT DAYOFWEEK (BLOCK_TIMESTAMP)
    ) as day_Active_in_week
    from
    osmosis.core.fact_transactions
    Run a query to Download Data