with stake as ( select tx_id as tx
from flipside_prod_db.solana.fact_events
where program_id = 'STkwf3sbMapjy7KV3hgrJtcVvY4SvRxWQ8pj4Enw1i5' and block_timestamp::date >= '2022-05-01')
select block_timestamp::date as date , count(DISTINCT tx) as total_stakes , count(DISTINCT signers) as staker
,sum(PRE_TOKEN_BALANCES[0]:uiTokenAmount:amount/pow(10,9)) as total_amount
from flipside_prod_db.solana.fact_transactions a join stake b on a.tx_id = b.tx
where PRE_TOKEN_BALANCES[0]:mint = 'xAURp5XmAG7772mfkSy6vRAjGK9JofYjc3dmQDWdVDP'
group by 1