With T1 as (
SELECT
distinct PROPOSAL,
min(BLOCK_TIMESTAMP) as mindate
from solana.core.fact_proposal_votes
where PROGRAM_NAME='GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw'
and REALMS_ID='6orGiJYGXYk9GT2NFoTv2ZMYpA6asMieAqdek4YRH2Dn'
group by 1
order by 2 desc
)
SELECT
max(mindate)::date as date
from T1