Rewrite the sql statement to make it correct.

Assignment Help Programming Languages
Reference no: EM13930338

Consider the following tables:

Customers

CustomerID LastName FirstName State

1 Cohen Mike CO

2 Highley Michelle MI

3 Cohen Margot MI

Orders

OrderID CustomerID Ordered_Item Date_Ordered

1 3 DVD Movie 1/1/2009

2 1 Computer Book 3/1/2009

3 2 Music CD 2/1/2009

Write an SQL statement that will return the following result:

Name Location Item Date

Margot Cohen OH DVD Movie 1/1/2009

Michelle Cohen GA Music CD 2/1/2009

Mike Cohen CO Computer Book 3/1/2009

Using the two tables from #8, write an SQL statement that uses a SUB QUERY and the IN keyword to return the First Name of

the customers who live in the state of MI.

Tell why the following SQL statement is incorrect. Rewrite the SQL statement to make it correct. (Hint: The fields of the table

are StudentName, Assignment, Grade. A student's name can be in the table more than once since they could have several

assignments.)

SELECT StudentName, AVG(Grade)

FROM GradeBookTable

 

Attachment:- sql.doc

Reference no: EM13930338

Questions Cloud

Analysing the professional attributes and scope of practice : Write a 1000 word essay discussing and analysing the professional attributes and scope of practice that differentiates the specialty nurse in your elective.
What two items are most responsible for the difference : What two items are most responsible for the difference between Target's net income and its cash flow from operating activities in 2010?
Determine the range of weights : Compute the force P required to slide the door at a steady speed if wheel A becomes "frozen" and does not turn in its bearing.
Study of individual behaviour-individual industry : Micro economics- study of individual behaviour -individual industry like education, meat industry, tourism and agriculture. Choose any one industry from Australia and discuss the reforms been done in that industry.
Rewrite the sql statement to make it correct. : Tell why the following SQL statement is incorrect
Explain how gdp is measured in your country : Explain how GDP is measured in your country (Nepal). Provide real life examples.
Develop a specific plan to address the problem : Cameron is conducting a study that addresses the differences in achievement scores between schools that use block scheduling and schools that use a traditional scheduling format. He has accessed average achievement scores for 1200 schools and now ..
This chapter explained that many companies : Based only on the information in the statements of cash flows, does Sirius XM appear to be growing the capacity of its business? Explain.
Number of non-current assets : AGES controls a number of non-current assets. To make things simple, the owner decided all non-current assets should be depreciated using the straight line depreciation method*. Details relating to assets controlled by AGES are shown below:

Reviews

Write a Review

Programming Languages Questions & Answers

  Write function to accept single argument-find prime number

Write down function named isPrime( num ) which accepts the single argument (num) and returns True if argument is prime, and False otherwise.

  Write a program for a furniture company

Write a program for a furniture company that determines the price of a table. Ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany. The output is the name of the wood chosen as well as the price of the table

  Write console application that displays the sizes

Create a file that contains your favorite movie quote.  Use a text editor such as Notepad and save the file as Quote.txt.  Copy the file contents and paste them into a word-processing program such as Word.

  Advantages of using invisible html table to create web page

What advantages do you see in using an invisible HTML table to structure an entire Web page? What disadvantages does the table structure pose?

  Construct a diagram using rationaleto map the arguments

Construct a diagram using Rationaleto map the arguments about a moral claim that you have identified in the article/case study

  Direction and magnitude be integers or doubles

Design the program consider Will the direction and magnitude be integers or doubles - will the input vectors be passed by value, by reference, or by const reference?

  Write procedure to scan string for first occurrence

Write procedure called Str_nextword to scan string for first occurrence of a certain delimiter character and replaces the delimiter with a null byte.

  Find whether each shape is two dimensional shape

Find whether each shape is TwoDimensionalShape or a ThreeDimensionalShape. If it is a TwoDimensionalShape, display its area. If it is a ThreeDimensionalShape, display its area and volume.

  Creating webpage using css

In creating a web page, depending on the information you are trying to convey. What are CSS?

  Distinguishing web pages or web servers for task

Distinguish between any Web pages or Web servers you would use for this task.

  Make the class employee to initializes three data members

Make the class called Employee which comprises three pieces of information as data membersa first name (type string), last name (type string) and monthly salary (type int).

  Write application to compute the total cost of new carpet

Write the application which computes the total cost of new carpet for a rectangular room. Application must first ask user for the current cost of the carpet per square foot. It then asks for both length.

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