sql - Filter top by group -


we have following situation query in oracle.

we have orders , transactions, order being mapped multiple transactions.

order orderid|customer|.....  transaction orderid|transactionid|transactiondate|..... 

we need display latest transaction each order. how go in oracle 11g?

this 1 method

select t1.* transactions t1 inner join ( select orderid,max(transactiondate) transactiondate transactions group orderid ) t2 on o.orderid=t.orderid , t1.transactiondate =t2.transactiondate  

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -