首页 > > 详细

辅导php编程、Python语言讲解、辅导留学生asp程序、asp辅导留学生

Select distinct customers (by name) who didn't purchase books from all the club(s) he or she belongs to.
Show the name of the customer.
Hint: for each customer in you answer table, there is at least one club that he or she had participated but didn't purchase from.
6. six
For each customer, show the category he or she spent more on the books of that category than on books of any other category?
Show customer name, the category and the cost.
8. eight
Select the books, which are more expensive than the average price (across all clubs) of the most expensive books (for each club) written in English. If a club doesn't have books written in English, do not count.
Show the title, the year and the price of the book.
9. nine
Suppose all books shipped to the customer in purchases made on the same time (when) are shipped as one package. Remember, that customers are billed for the books and the postage.
For each customer, how much do they spend on each package? If the weight of one package is X grams, the entry just higher than (or equal to) X is found in the shipping table and the associated shipping price is the postage for this package.
Show the customer's cid, the day of the package and the cost, order by cid.
10. ten
Suppose all the books shipped to a customer purchased **in one club** made on the same **day** are shipped as one package. If the total price of one package is higher than (or equal to) 50 dollars, it's post-free. Otherwise, postage is extra.
For each customer, find the package that costs him the most.
Show customers's cid, the day of the package and the cost, order by cid.
Hint: don't forget about the quantity of each purchase! Also, '1998-1-1-17.18.00' is a string! So for DB2 to consider it as a date, you must cast it as well: cast('1998-1-1-17.18.00' as date).

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!