Elprognerd5 - total contracts in 2023
    Updated 2023-01-08
    SELECT
    'Active Contracts' as "Type",
    count(DISTINCT (message_value:contract)) as counter,
    counter/count(DISTINCT date_trunc('day', block_timestamp)) as "Average Number of Contracts per Day"
    from terra.core.ez_messages
    where block_timestamp >= '2023-01-01'
    and message_type LIKE '/cosmwasm.wasm.v1.MsgExecuteContract'
    UNION
    SELECT
    'New Contracts' as "Type",
    count(DISTINCT (attributes:instantiate:_contract_address)) as counter,
    counter/count(DISTINCT date_trunc('day', block_timestamp)) as "Average Number of Contracts per Day"
    from terra.core.ez_messages
    where block_timestamp >= '2023-01-01'
    and message_type LIKE '/cosmwasm.wasm.v1.MsgInstantiateContract'
    Run a query to Download Data