select
date_trunc('day',block_timestamp) as block_day,
try_base64_decode_string(tx_message:txn:apaa[0]::string) as note,
count(note)
from algorand.application_call_transaction
where app_id = 710518651 AND
TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = 'stake' AND
note is not NULL
group by block_day,note
order by block_day