how to do calculation in oracle?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: how to do calculation in oracle?

  1. #1
    Join Date
    Apr 2008
    Posts
    1

    how to do calculation in oracle?

    basically I have 2 tables and I'm trying to calculate the total sales for it.

    products
    pid
    pname
    price
    Q_on_hand


    Orders
    Oid
    Quantity

    I'm trying to figure out how to write a sql state that show total sales by products:Pid and Pname. Then totalsales.

    hopefull someone can help me out with this or point me out to the right direction as I don't know how to do the calculation part in oracle at all.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    I'm not doing it for you but I can point you in the right direction.

    Research sum() and group by, try your best and if needed post your doubts.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width