Home » SQL & PL/SQL » SQL & PL/SQL » Help me out with this query too (oracle SQL 10g)
Help me out with this query too [message #432086] Sat, 21 November 2009 00:36 Go to next message
pradeep53444
Messages: 2
Registered: November 2009
Location: Bangalore
Junior Member
I got transaction table
Individual_id    Trans_date    Trans_amt    deb_cred_indicator
   001            01-JAN-09      1600           CR
   002            05-JAN-09       700           CR
   001            25-JAN-09       800           CR  
   001            10-JAN-09       300           DR
   002            25-JAN-09       400           DR
   001            10-FEB-09       300           CR
   001            15-FEB-09       500           DR
   002            20-FEB-09       800           DR
   002            25-FEB-09       500           CR
   002            28-FEB-09       200           CR

(1)The output should be

Individual_id    Month   Closing_balance  No_of_transaction
   001            JAN      2100               3
   002            JAN       300               2
   001            FEB      -200               2
   002            FEB      -100               3

Help me..

[Mod-edit: Frank added code tags to improve readability]

[Updated on: Sun, 22 November 2009 04:32] by Moderator

Report message to a moderator

Re: Help me out with this query too [message #432091 is a reply to message #432086] Sat, 21 November 2009 00:57 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version with 4 decimals.

Post a working Test case: create table and insert statements along with the result you want with these data.

Explain your requirements WITH WORDS.

Regards
Michel
Re: Help me out with this query too [message #432092 is a reply to message #432086] Sat, 21 November 2009 01:48 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
http://www.orafaq.com/forum/m/432087/136607/#msg_432087

And show us what you tried and got

sriram

[Updated on: Sat, 21 November 2009 01:49]

Report message to a moderator

Previous Topic: i got a query to solve
Next Topic: Why order by clause is not working in subquery
Goto Forum:
  


Current Time: Thu Sep 29 10:49:32 CDT 2016

Total time taken to generate the page: 0.10526 seconds