select
to_date(block_timestamp) ts_day
, sum(token_0_amount) burnt_luna
from terra.swaps
where to_date(block_timestamp) >= dateadd(day, -30, current_date())
and ask_currency in( 'UST','KRT','SDT')
and offer_currency = 'LUNA'
and tx_status = 'SUCCEEDED'
group by 1