select date_trunc('day',block_timestamp) as d1,
avg(msg_value:execute_msg:swap:belief_price) as Astro_price,
count(tx_id) as transaction_numb
from terra.msgs
where msg_value:contract = 'terra1l7xu2rl3c7qmtx3r5sd2tz25glf6jh8ul7aag7' and msg_value:execute_msg:swap is not null and tx_status='SUCCEEDED'
and block_timestamp > current_date - 90 group by 1 order by d1