Question: Draw from the sales data model to prepare a statement that would show product code, product name, and the sum of units sold ( i

Draw from the sales data model to prepare a statement that would show product code, product
name, and the sum of units sold (i.e., quantity from the orderLine table), but only for products with 250 or more
units sold. Use column aliases (including Sum of Units Sold for the aggregate function) and table aliases. Sort by
the sum of units sold in descending order. Hint #1: this statement includes a HAVING clause. Hint #2: note that
productCode appears in the product table and the orderLine table.
Q5(18 POINTS). Draw from the project data model to prepare a statement that would show only those employees
who did not work on a project. The result set should show department name, employee first name, employee last
name, and employee title. Youll need to use the NOT EXISTS clause. Use table aliases and column aliases. Hint #1:
if an employee has not worked on a project, it means that the employee is not represented in a row in the
project2emp table. Hint #2: youll need two tables in your outer querys FROM clause (and one of them is
department). These two tables must be joined in the outer query. Hint #3: the SELECT statement at the top of page
2 in SQL Code Part 6 serves as an example.
Q6(14 POINTS). Draw from the project data model to prepare a statement that would show project name, the
estimated number of project hours (i.e., proj2empEstHours), and a CASE-WHEN-ELSE column (alias of Project
Size) comprising three groups: Large project,Medium project, and Small project. A large project has 5,000 or
more estimated project hours and a medium project has between 1,500 and 4,999 hours. All other projects are
small projects. Unlike the example in SQL Code Part 6, you will pull from two tables (because project name is in
your SELECT clause) and thus will need a WHERE clause that joins the two tables. Use column aliases and table
aliases. No ORDER BY clause is needed.Page
Draw from the sales data model to prepare a

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 Programming Questions!