elsina✅ 1. Transactions: single numbers - total
    Updated 2023-01-11
    with price as (
    select
    date_trunc('day', recorded_at) as date,
    avg(price) as osmo_usd
    from osmosis.core.dim_prices
    where
    symbol = 'OSMO'
    group by 1
    ),
    tx as (
    select
    count(distinct tx_id) as "tx count",
    count(distinct tx_from) as "Active users"
    from osmosis.core.fact_transactions
    where tx_status = 'SUCCEEDED'
    ),
    fee as (
    select
    sum((substring (fee,0,charindex('uosmo',fee)-1)/pow(10,6)) * osmo_usd) as "fee"
    from osmosis.core.fact_transactions join price on date = block_timestamp::date
    where
    tx_status = 'SUCCEEDED' and
    fee like '%uosmo%'
    )
    select *
    from tx, fee
    Run a query to Download Data