Say I have a table \"transactions\" that has columns \"acct_id\" \"trans_date\" and \"trans_type\" and I want to filter this table so that I have just the last transaction f
select t.acct_id, t.trans_type, tm.trans_date
from transactions t
inner join (
SELECT acct_id, max(trans_date) as trans_date
FROM transactions
GROUP BY acct_id;
) tm on t.acct_id = tm.acct_id and t.trans_date = tm.trans_date