I am trying to create the following queries: 1) Display the order number, customer number, order date, and items ordered for order number 1
2) Total the cose of order number 1
3) Find any customers who have not placed orders
4) Produce a list of all hte products (i.e., product description) and the number of times each product has been ordered
5) List the names and number of employees supervised (label this value HeadCount) for all the supervisors who supervise more than two employees
6) List in alphabetical order the names of all employees (managers) who are managing people with skill ID BS12; list each such manager's name only once, even if htat manger manages serveral people with this kill
7) Show the customer ID and name for all the cutomers who have ordered both products with IDs 3 and 4 on the same order
This is homework right ? Or at least Baylor is "A top Texas Christian University" I suggest you re-read your course notes or ask your tutor for further explanation of any points you are unclear of.
answered Nov 11, 2009 at 05:47 AM
I think these queries are basic and something you should learn by yourself to get the understanding of t-sql language, but today I am kind and give you the answers anyway.
I can't find order number or the customer number, but i think you mean order_id and customer_id
Question 2 I do not understand what you mean by "cose", so you have to solve it by yourself.
Question 7 (this code work for SQL 2005)
answered Nov 11, 2009 at 06:05 AM