afonsoUntitled Query
    Updated 2023-01-22
    select
    block_timestamp::date as day,
    count(distinct tx_id) as txns_count,
    count(distinct (iff(transfer_type = 'IBC_TRANSFER_IN', tx_id, null))) as inflow_txns_count,
    count(distinct (iff(transfer_type = 'IBC_TRANSFER_OUT', tx_id, null))) as outflow_txns_count,
    count(distinct sender) as senders_count,
    count(distinct receiver) as receivers_count,
    txns_count / senders_count as txns_per_user,
    sum(txns_count) over (order by day) as cumulative_txns_count,
    sum(inflow_txns_count) over (order by day) as cumulative_inflow_txns_count,
    sum(outflow_txns_count) over (order by day) as cumulative_outflow_txns_count,
    sum(senders_count) over (order by day) as cumulative_senders_count,
    sum(receivers_count) over (order by day) as cumulative_receivers_count,
    sum(txns_per_user) over (order by day) as cumulative_txns_per_user
    from osmosis.core.fact_transfers
    where tx_succeeded = 1
    and block_timestamp > current_date - interval '3 months'
    group by 1
    order by 1
    Run a query to Download Data