SELECT swaps.tx_id, txs.fee[0].amount[0].amount / 1e6 as fee, txs.fee[0].amount[0].denom as denom, txs.BLOCK_TIMESTAMP as date, txs.BLOCK_ID
from ASTROPORT.SWAPS as swaps, TERRA.TRANSACTIONS as txs
WHERE swaps.tx_id = txs.tx_id
AND array_size(txs.fee[0].amount) > 0
AND denom = 'uusd'
AND date < '2022-04-15'
ORDER BY fee DESC
LIMIT 500;