
January 22nd, 2013, 07:02 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 1
Time spent in forums: 9 m 57 sec
Reputation Power: 0
|
|
Help needed writing SQL query
Hello,
Question #1:
Table Name: Order
Order ID Customer Product
1 jim comb
2 sally comb
3 sally mirror
4 jim mirrior
5 bob comb
6 bob toothbrush
7 bob razor
8 denise comb
Please write the SQL query that summarizes a unique list of customers and a count of the number of products per customer from the table "Order".
Question 2
Table Name: OrderUpdate
UpdateID OrderID New Product
1 3 toothbrush
2 4 toothbrush
3 6 mirror
4 8 toothpaste
Please write the SQL query that updates column "Product" in table "Order" (from the previous question) with column "NewProduct" in table "OrderUpdate" with the same "OrderID".
[MYSQL]
|