Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> sum

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: sum
 busi  Posted: Jan 23, 2007 06:40:30 AM

 Total Post: 13
 Joined: Jan, 2007






 HI Friends...I have got one quary...
For Example...i Created one table as Login with Amount and Usertype as Fields....

EX:
ID Amount UserType

1 2400 NGO

2 3000 Academic

3 4000 Academic

4 500 Foreign Delegate


1)Now i want to get sum of Foreign Delegate And Sum of Non Foreign Delegates
2) I want to get it in single quary
3)I don't want to use Union ....

Please Help Me.....

Regards
Narendra...



 Vigyan
Posted: Jan 25, 2007 06:44:36 AM  

 Total Post: 386
 Joined: May, 2001






 
It is not very clear what you are trying to achieve here. If you have multiple records of "Foreign Delegate" then can't you use sum function like this.

select sum(amount) from table where usertype = 'Foreign Delegate'

or

select sum(amount) from table where usertype <> 'Foreign Delegate'

Let me know if I have misunderstood your question.

- Vigyan


 busi
Posted: Jan 25, 2007 06:57:30 AM  

 Total Post: 13
 Joined: Jan, 2007






 
NO sir,That Table dosn't have multiple records for foreign Deligates...

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi333
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software