Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

#1) Number of Orders with Credit Card Payment
Write a SQL statement that will count the number of orders in the [Order Details] table that were paid by credit card.

Example:
SELECT [field], count(1)
FROM [table]
WHERE [field] = "value"
GROUP BY [field]


#2) Top Selling Product based on Order Amount (One Join)
Write a SQL statement that will join the [Order Details ] table and [Products] table to determine the top selling product based on [Quantity]*[Unit Price].
Example:
SELECT B.[field], sum(A.[field]*A.[field]) as Orders
FROM ( [table] A
INNER JOIN [table] B
on A.[field] = B.[field] )
GROUP BY B.[field]
ORDER BY sum(A.[field] *A.[field] ) desc


#3) Products with Less Than $2500 in Orders
Write a SQL statement that will join the [Order Details] table and [Products] table to determine only those products with less than $2500 in Orders based on [Quantity]*[Unit Price].
Example:
SELECT B.[field], sum(A.[field] * A.[field]) as Orders
FROM ([table] A
INNER JOIN [table] B
on A.[field] = B.[field])
GROUP BY B.[field]
HAVING sum(A.[field]*A.[field]) < value
ORDER BY sum(A.[field] *A.[field]) desc


#4) Top Producing Employee base on Order Amount (Two Joins)
Write a SQL statement that will join the [Orders] table, [Order Details] table and [Employees] table to determine the highest producing employee based on the employees first name and [Quantity]*[Unit Price].

Example:
SELECT C.[field], sum(A.[field] *A.[field] ) as Orders
FROM (([table] A
INNER JOIN [table] B
on A.[field] = B.[field])
INNER JOIN [table] C
on B.[field] = C.[field])
GROUP BY C.[field]
ORDER BY sum(A.[field] *A.[field] ) desc


Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91706051
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Suppose in your company you formulate a python script that

Suppose in your company you formulate a Python script that inserts, updates, and deletes data in tables in a MySQL database. You post your Python script on a shared drive for other staff members to use. What are some the ...

A medical researcher is interested in determining whether a

A medical researcher is interested in determining whether a new medication for lung cancer is effective in a group of patients with early-stage disease. Explain what a Type I and Type II error would be in this study. (Be ...

Briefly explain what separations are how do they effect the

Briefly explain what separations are, how do they effect the average duration of unemployment?

The gravitational attraction between any two objects in the

The gravitational attraction between any two objects in the universe is given by the following formula: Force of Gravity = (G * m * n) / r 2 Where  m  and  n  are masses of the objects in kilograms,  r  is the distance b ...

Identify at least two 2 factors that have led to the

Identify at least two (2) factors that have led to the explosive growth of digital crime over the past a few decades. Next, describe the most common forms of digital crime, and give your opinion as to why those forms you ...

Sales bar chartwrite a program that asks the user to enter

Sales Bar Chart Write a program that asks the user to enter today's sales for 5 stores. The program should then display a bar graph comparing each store's sales. Create each bar in the bar graph by displaying a row of as ...

What are the best practices to follow for microsoft windows

What are the best practices to follow for Microsoft Windows network security. Which two would you start with and why?

1population parametric mean 53501standard deviation

1) Population (parametric) mean= 53.501 Standard deviation = 1.79208 Imagine that 5 individuals are sampled at random from this population. Calculate the probability that the average calculated will be less than the valu ...

What are some of the skill sets required for the various

What are some of the skill sets required for the various aspects of cloud administration. Are there any certifications related to cloud computing? Is there value in obtaining one of these certifications?

Companies persue closer coordination and collaboration with

Companies persue closer coordination and collaboration with channel suppliers to better address customer needs inorder to 1) Develop human resource management activities that improve the skills , expertise and knowledge ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As