question

we3d avatar image
we3d asked

help me wite query for these question

[link text][1] ![alt text][2] can some one pls write queries to answer the following questions based my design, i have been working on it all day and i am tired i could use some help: a. Find all those customers who have not purchased anything from Niles Video Inc. b. Get the total number of DVDs and video tapes sold per genre. c. Get the average number of DVDs per purchase. [1]: /storage/temp/482-final+project+it+240+11-19-2012.zip [2]: /storage/temp/483-table11.png
sqlquery
table11.png (217.4 KiB)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image Fatherjack ♦♦ commented ·
Is this a homework question?
1 Like 1 ·

1 Answer

·
Sharma avatar image
Sharma answered
a. Find all those customers who have not purchased anything from Niles Video Inc. SELECT CustomerID,Name FROM CustomerINfo CI where customerID not exists( select customerID from OrderQuery oq inner join Movies m on m.itemNumber=oq.itemnumber where Genre='Niles Video Inc') b. Get the total number of DVDs and video tapes sold per genre. > select genre,sum(quantity) from > OrderQuery oq inner join Movies m on > m.itemnumber=oq.itemnumber group by > m.genre c. Get the average number of DVDs per purchase. select Title,avg(sum(quantity)) from Movies m inner join OrderQuery oq on oq.itemnumber=m.itemnumber group by Title
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.