with active as (select distinct msg_value:sender::string as addresses
from terra.msgs
where tx_module = 'tx' and date(block_timestamp) >= CURRENT_DATE - 90
and tx_status = 'SUCCEEDED' and msg_module = 'wasm' and msg_type = 'wasm/MsgExecuteContract'
)
select count(addresses) as count
from active