Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Northwind . Look at the results of this query and tell me why it must be an invalid query. Choose all the acceptable answers.

Use Northwind . Look at the results of this query and tell me why it must be an invalid query.

Choose all the acceptable answers.

SELECT Customers.CompanyName

, Orders.ShippedDate

, [Order Details].UnitPrice

, Products.ProductName

FROM Products INNER JOIN Customers

INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID

INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID

ON [Order Details].ProductID = [Order Details].ProductID

Where Orders.ShippedDate Between '4/1/2008' And '4/30/2008'

And products.productname = 'TOFU'

Order By CompanyName

There is no ON clause for the first INNER JOIN ( Products INNER JOIN Customers ).

You need a UNION , you can't just write INNER JOIN 2 times

This query does not retrieve shipments that occurred after midnight on 4/30/2018.

Currently, the query is invalid because Products joining Customers is a cross join.

There are no orders for tofu in April 2008, so how you got this query to display those dates with tofu orders is beyond me

Order by company name should be in brackets. ORDER BY [Company Name].CompanyName

I don't know why it would be invalid because it brought back 186 results.

We should use the "SELECT DISTINCT" syntax.image text in transcribed

Suppliers ed- od Order Details CompanyName ContactName QuantityPerUnit Customers CompanyName Fax ContactTide EmployeetD EmployeeTerritories 71 Territ DryID ShpCty CustomerCustomerDemo Territories TerritoryD ShpCountry RegionD Shippers CustomerDemographics CustomerTypelD Region Region ShipperID CompanyName Phone ReportsTo

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions