mariyaNumber of unique transactions
    Updated 2022-04-26
    WITH TERRA AS (
    SELECT
    date_trunc('day',block_timestamp) as terra_date,
    count(distinct tx_id) as terra_tx_count,
    count(distinct COALESCE(msg_value:delegator_address, msg_value:voter, msg_value:sender, msg_value:from_address, msg_value:to_address)) as terra_Uq_Addresses, -- accounts for 99% of wasm address
    COUNT(*)/terra_Uq_Addresses as AvgTxnPerAddress
    FROM terra.msgs
    WHERE msg_module NOT IN ('oracle')
    GROUP BY 1
    ORDER BY 1
    )
    SELECT
    *
    FROM TERRA
    Run a query to Download Data