Hi
Oracle Version
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
PL/SQL Release 9.0.1.1.1 - Production
CORE 9.0.1.1.1 Production
TNS for 32-bit Windows: Version 9.0.1.1.0 - Production
NLSRTL Version 9.0.1.1.1 - Production
I am trying a Sql Query , where i want to list out all last record of each productcode whose closing balance is > 0
Select productcode,trandate,clbal From fgaging where trandate = ( SELECT MAX(trandate) from fgaging)
Table with Records | | | | | |
productcode | trandate | cl balance | | | |
10001 | 01/04/2014 | 5000 | | | | |
10001 | 15/12/2014 | 0 | | | | |
10001 | 01/02/2015 | 2000 | | | | |
10002 | 11/04/2014 | 0 | | | | |
10002 | 15/11/2014 | 10000 | | | | |
10002 | 01/02/2015 | 0 | | | | |
10003 | 01/04/2014 | 0 | | | | |
10003 | 15/12/2014 | 0 | | | | |
10003 | 01/02/2015 | 2000 | | | | |
| | | | | | |
Want a Result Like this where both this records last transaction is having closing balance |
10001 | 01/02/2015 | 2000 | | | | |
10003 | 01/02/2015 | 2000 | | |
Thanks in advance
Sandy