Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Northwind Database 2. List the CustomerID and the average Freight cost for each customer. Name the Freight column Average Freight Cost. Display the Average

In Northwind Database

2. List the CustomerID and the average Freight cost for each customer. Name the Freight column "Average Freight Cost." Display the "Average Freight Cost" with two decimal places.

SELECT CustomerID, avg(Freight) as "Average Freight Cost" FROM orders GROUP BY CustomerID; *I need to display 2 decimal places here for Average Freight cost*

3. List the same information in step 2 but only for customers who have an average freight cost more than $100. Again, ensure to display the "Average Freight Cost" with two decimal places.

SELECT CustomerID, avg(Freight) as "Average Freight Cost" FROM orders GROUP BY CustomerID HAVING avg(Freight) >100; *Same as number 2, but also need to display 2 decimal places*

4. List each Employees ID along with their first and last name and their most recent order date. Name the column that shows the most recent order date as "Most Recent Order". (Hint: This will require the use of two tables, the employees and orders tables.) *Mainly just need this question* Thanks for you help

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

Describe the appropriate use of supplementary parts of a letter.

Answered: 1 week ago