CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Jan 2010
    Posts
    161

    Oracle how to get this result?

    Hello everyone
    I am trying to solve this problem which I can't find a solution of because I am new to Oracle and hope someone can guide me.

    I have attached the .sql file which creates the tables and everything and from this database I need to:
    Show the dlrcode-dlrname (which is the dealer code and dealer name)
    I need to calculate the total number of bike sold to each dealer
    and the total sales price to each dealer.

    Now I managed to do a little but are not being able to do it all.
    This is the query I made and if someone things there are amendmends to do please let me know.

    <CODE>SELECT d.dlrname,b.DLRCODE, b.bikepurchprice, b.bikesellprice
    FROM rr_bike b,rr_dealer d
    where d.dlrname=d.dlrname and b.dlrcode>0;</CODE>

    Thank you in advance.
    Attached Files Attached Files
    Last edited by cpu2007; March 17th, 2010 at 02:17 PM.

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

Featured