This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes JDBC oracle newbie query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC oracle newbie query" Watch "JDBC oracle newbie query" New topic
Author

JDBC oracle newbie query

Markus Smith
Greenhorn

Joined: Dec 04, 2001
Posts: 1
Hello everyone,
I am a new user to both JDBC and Oracle and am unable to proceed with the following queries. It would be helpful if someone can assist me with the same.
The schema for a store is:
user (uid, addr)
region (rid, rname)
shop (sid, rid)
category (cid, cname)
product (pid, cid, pname, cost)
transaction (tid, uid, sid, date)
items (tid, pid, qty)
The required SQL queries are:
1. Best selling product for a specified store (sid is input by user) [Best selling means that the total sale (cost * qty) of that product is maximum]
2. Most profitable product category per region per month. [Region and month input by user]
Thx,
Markus
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JDBC oracle newbie query