ultranight
New Member
I'm somewhat newbie in Oracle SQL, so bear with me.I have two tables:\[code\]Contaiers:===========eq_nbr,size,dateGate Transactions (gate_tran):==================eq_nbr,date,trucker_id\[/code\]There are many gate transactions per container, so I need the last record for a particular eq_nbr.I was thinking on something like:\[code\]select ct.eq_nbr, ct.size, ct.date, (select trucker_id last over (partition by gt.eq_nbr) from gate_tran gt where gt.eq_nbr = ct.eq_nbr)from containers ct\[/code\]But it doesn't work. Any ideas?