MufasaDaily activity of DAU Users over the time
    Updated 2022-10-19
    with activity as(
    select count(distinct trunc(block_timestamp, 'day')) as date, tx_from as no_of_users,
    case when date >= 30 then 'Active'
    when date >= 15 and date < 30 then 'Casual'
    when date < 15 then 'Not active'
    end as category
    from osmosis.core.fact_transactions
    where to_date(block_timestamp) > CURRENT_DATE - 60
    and TX_STATUS = 'SUCCEEDED'
    group by no_of_users
    order by date desc
    ),
    dau as (select no_of_users, date
    from activity
    where category = 'Active'),
    liquidity as (
    SELECT trunc(BLOCK_TIMESTAMP, 'day') as date,
    count(DISTINCT TX_ID) as transactions_lp
    from osmosis.core.fact_liquidity_provider_actions
    where ACTION = 'pool_joined'
    and TX_STATUS = 'SUCCEEDED'
    and LIQUIDITY_PROVIDER_ADDRESS in (SELECT no_of_users from dau)
    and to_date(block_timestamp) > CURRENT_DATE - 60
    group by date
    order by transactions_lp desc),
    swapping_activity as(
    select trunc(BLOCK_TIMESTAMP, 'day') as date, count(distinct TX_ID) as transactions_swappers
    from osmosis.core.fact_swaps
    where TX_STATUS = 'SUCCEEDED'
    and TRADER in (SELECT no_of_users from dau)
    and to_date(block_timestamp) > CURRENT_DATE - 60
    group by date
    order by transactions_swappers desc
    ),
    voting_activity as (
    select trunc(BLOCK_TIMESTAMP, 'day') as date, count(distinct TX_ID) as transactions_votes
    Run a query to Download Data