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

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -