Question: Question 1: Simple Queries [25 Marks] Refer to the entity-relation scheme shown in page 4. Use the file DreamHome.db included in this assignment to test

 Question 1: Simple Queries [25 Marks] Refer to the entity-relation scheme

Question 1: Simple Queries [25 Marks] Refer to the entity-relation scheme shown in page 4. Use the file DreamHome.db included in this assignment to test the queries. Answer the following questions using SQL to produce the view. Only the SQL query will attract marks, not the view. Also, you must include at the end of your query the primary and foreign keys (if any) used. Degree and cardinality of the resulting view, and one sentence explaining the content of the first tuple based on the attributes queried. a) Find the total number of Managers and the sum of their salaries. [5 marks] b) Find the minimum, maximum, and average staff salary. [5 marks] c) For each branch office with more than one member of staff, find the number of staff working in each branch and the sum of their salaries. [5 marks] d) Construct a list of all cities where there is either a branch office or a property. [5 marks] e) Construct a list of all cities where there is both a branch office and a property. [5 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!