Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> SQL question

SQL question

From: strider <P.Howgego_at_uea.ac.uk>
Date: 8 May 2003 05:49:03 -0700
Message-ID: <acc3ac1d.0305080449.6754942f@posting.google.com>


Hi, not sure if this is the right place to post a question on SQL. Apologies if it isnt. I have an upcoming exam on databases and Ive been looking at some past papers
One of the questions that Im having trouble with is:

You have these tables:
customer(cust_id,name,city,postcode)
order(order_id,cust_id,date)
orderline(order_id,video_id,quantity)
video(video_id,description,price,category_id) category(category_id,description)

Create a view called CustomerSummary which shows the customer name along with the total number of videos ordered and total order value for each customer

I know I need joins and a SUM and a COUNT somewhere but im getting confused with it all, so I would be very grateful if someone could give the SQL statement and an explanation of how it works

Thanks v. much Received on Thu May 08 2003 - 07:49:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US