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 a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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