Determine the highest producing employee

Assignment Help Basic Computer Science
Reference no: EM13997214

#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]

<Paste SQL Statement Here>
<Insert Result Image Here>

#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

<Paste SQL Statement Here>
<Insert Result Image Here>

#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

<Paste SQL Statement Here>
<Insert Result Image Here>

#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

<Paste SQL Statement Here>
<Insert Result Image Here

Reference no: EM13997214

Questions Cloud

What is the speed boats final speed : A speedboat moves on a lake with initial velocity vector v1,x = 9.81 m/s and v1,y = -2.61 m/s, then accelerates for 6.81 seconds at an average acceleration of avgx = -0.103 m/s2 and aav,y = 0.106 m/s2. What are the components of the speedboat's f..
Theories of natural law theory and social contract theory : Compare/contrast the theories of utilitarianism and categorical imperative. Compare/contrast the theories of natural law theory and social contract theory
Find the minimum value of the boat speed : A speedboat can travel with a speed of 55 m/s in still water. If the boat is in a river that has a flow speed of 5 m/s , find the maximum value of the boat's speed relative to an observer on the riverbank.
What is the frequency of the train whistle tone : A train is approaching a signal tower at a speed of 40 m/s. The train engineer sounds the 1000-Hz whistle. What is the frequency of the train whistle tone that is heard by the switchman?
Determine the highest producing employee : 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].
What is the total charge q of the sphere : A sphere of radius a=6cm carries a uniform charge density ρ=450nC/m^3. what is the total charge Q of the sphere. Using Gauss's law find the electrical feld inside the sphere at a distance r=2cm from the center of the sphere.
Calculate potential as a function of r from center of sphere : A sphere of radius R has a radius dependent charge density ρ = B . r3 in terms of R and B. Calculate the potential as a function of r from the center of the sphere.
What is the electric field and potential at a distance x : A sphere of radius R and total charge Q is drilled into so that it is hollowed out vertically (along the z-axis) with a cylindrical space of radius a (where a
Find the total energy stored in the field : A spherical capacitor consists of a single conducting sphere of radius R = 14 cm that carries a positive charge Q = 35 nC. The capacitance for this spherical capacitor is given by the equation C = 4Πε0R. Write an equation for the energy stored in..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What kind of new input and output devices

What kind of new input and output devices do you think future computers might have. Why

  Calculate circumference and area of the circle.

What are the two most important benefits of the Java language?

  Transport layer

Transport layer

  What is regression testing

What are some advantages and disadvantages of using centralized network management versus distributed network management?

  The state of maryland is developing a web-voting interface

1. The State of Maryland is developing a web-voting interface. For selecting the candidates, one design (RB) is a set of radio buttons and another is (CB) a combo-box (drops down when selecting the scroll arrow icon), both using standard fonts at 10-..

  Key step in validating a proposed idea

Abstract Background: A key step in validating a proposed idea or I have to manually look through papers to find suitable datasets and their URLs, Which is strenuous and inefficient. To better encourage the data discovery process. And provide a bet..

  Cloud computing hardware and software

What is hypervisor? Provide examples.

  Cryptographic and network security

Using the two keys (memory words) cryptographic and network security, encrypt the following message: "Be at the third pillar from the left outside the lyceum theatre tonight at seven. If you are distrustful bring two friends."

  Solve equations and show that no solution exists

Solve the following equations for x and y or show that no solution exists. Show your work (in particular, what division must you carry out to solve each case). (i) 5x + 23  6 mod 47

  What are the five different approaches to risk

What are the five different approaches to risk? What are the pros and cons of each strategy? Support your answer with solid reasoning class is cmgt 400

  Write an algorithm for the hangman game

1 Write an Algorithm for the Hangman game(include step by step instructions for the game)2 Variable list for Hangman    Variable Name           Data Type        What it holds

  Understanding of computer hardware

The purpose of this assignment is for you to test your understanding of computer hardware, compatible architecture, and system requirements. You will design your own computer by selecting parts from the website NewEgg.com. You will be given a budget ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd