with txs as (
SELECT
BLOCK_TIMESTAMP,
TX_HASH,
SENDER
FROM aptos.core.fact_transactions
WHERE PAYLOAD_FUNCTION ilike '0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba%'
)
SELECT
BLOCK_TIMESTAMP::date as date,
count(DISTINCT TX_HASH) as n_txs,
count(DISTINCT SENDER) as n_users
FROM txs
WHERE date < current_date()
GROUP by 1
ORDER by 1 DESC
--*/