SELECT date,
category,
Chain_TVL as TVL,
ROUND(100*(chain_tvl-Chain_tvl_prev_day)/Chain_tvl_prev_day, 2) || '%' as "1d Change",
ROUND(100*(chain_tvl-Chain_tvl_prev_week)/Chain_tvl_prev_week,2) || '%' as "1w Change",
ROUND(100*(chain_tvl-chain_tvl_prev_month)/chain_tvl_prev_month,2) || '%' as "1m Change"
FROM external.defillama.fact_protocol_tvl
where
chain ilike 'Aptos'
AND date <= current_date -1
AND protocol = '{{aptos_defi_protocol}}'
ORDER BY date DESC