Reference no: EM132195761
Objectives:
• Learn to implement advance SQL statements
• To practise joining tables for retrieving data
• To practise the use of relational set operators to merge data
Activities
Task
1) Create a new database called Food_Beverages and import the fileFood_Beverages.sql.
2) Draw an ER diagram to represent thedatabase.
3) Use this new database to implement the SQL statements to complete the following:
a) In a following SELECT statement, how many rows will there be in the output? Explain how you have derived at this number. Describe how you can confirm the number iscorrect.
SELECT P.ProductID, C.CategoryID FROM Product AS P, Category AS C;
b) Are all the rows in the output of (a) meaningful? How can you modify that SELECT statement so that the rows in the two tables are logically joined and every row in the output ismeaningful?
c) Display the ID and the shipped date of every order along with the ID and name of the company in charge of shippingit.
d) Show the name and the quantity of the product(s) being listed in eachorder.
e) List the full name and the title of the person which each employee reports to. The ID and last name of the employee should be included in theoutput.
f) Display the ID and contact person of the supplier of the discontinued products. The ID of the product and category ID it belongs to should be included in theoutput.
g) Show the average unit price of the products in each category. The name of each category should be included in theoutput.
h) List the name and title of every customer contact person from Berlin, followed by the full name and title of the employees based in London. The city should be included in the output. (hint: use a relational setoperator)
i) Show the orders which have more than 5 products listed in them? The Order ID and the number of products list in it should be in theoutput.
j) What is the largest discount given to a product beingordered?
Strategy important to firm in twenty-first century landscape
: What is the definition of competitive strategy, and why is this strategy important to firms in the twenty-first century landscape?
|
Create a memo using memo template
: Revise the program to reflect the following changes: Use a for loop to prompt the student for the price of each book based upon the number of classes.
|
Describe the search processes you implemented
: Describe the search processes you implemented (including search words, and databases you searched), for obtaining the papers for the SLP assignment.
|
What are the advantages of using narrative text
: In an essay of 1,250-1,500 words, discuss and present the following: What are the advantages of using narrative text
|
Draw an er diagram to represent the database
: Create a new database - Draw an ER diagram to represent the database - In a following SELECT statement, how many rows will there be in the output?
|
Interpretation of the coefficient of x 1be
: Suppose a multiple regression model is given by y =1.61x 1+5.58 x2 +30.48 What would an interpretation of the coefficient of x 1be?
|
What is the purpose of the sopa and pipa
: CPSC 311 As an industry insider, look at both acts and think about the benefits and the drawbacks. In a research paper, cover the following questions.
|
Adults rated the effectiveness of advertisements
: In a? study, a random sample of 20 adults rated the effectiveness of advertisements. Each adult rated an advertisement that lasted 30 or 60 seconds.
|
How would you respond to this observation
: The problem with risk analysis is that it is possible to imagine virtually anything going wrong on a project.
|