Popex404Total Metrics Users & Last Month/Day
    Updated 2023-02-19
    SELECT
    'Total' as "Type",
    count (distinct tx_from) as "Total Users",
    count (*) as "Successful Transactions",
    min (block_timestamp) as "Min Date"
    FROM cosmos.core.fact_transactions
    where tx_succeeded = true
    Group by 1
    Union ALL
    SELECT
    'Last Month' as "Type",
    count (distinct tx_from) as "Total Users",
    count (*) as "Successful Transactions",
    min (block_timestamp) as "Min Date"
    FROM cosmos.core.fact_transactions
    where tx_succeeded = true
    and block_timestamp >= CURRENT_DATE - 31
    Group by 1
    Union ALL
    SELECT
    'Last 24 Hours' as "Type",
    count (distinct tx_from) as "Total Users",
    count (*) as "Successful Transactions",
    min (block_timestamp) as "Min Date"
    FROM cosmos.core.fact_transactions
    where tx_succeeded = true
    and block_timestamp >= CURRENT_DATE - 1
    Group by 1
    Run a query to Download Data