Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider a Products table ( ProductID , ProductName, Price ) and Sales table ( SaleID , ProductID, Quantity ) . Find all products that have
Consider a Products table ProductID ProductName, Price and Sales table SaleID ProductID, Quantity Find all products that have never been sold. SELECT ProductName FROM Products WHERE ProductID NOT IN SELECT ProductID FROM Sales; B SELECT ProductName FROM Products WHERE ProductID IN SELECT ProductID FROM Sales WHERE Quantity ; C SELECT ProductName FROM Products P WHERE EXISTS SELECT FROM Sales S WHERE SProductID PProductID; D SELECT PProductName FROM Products P LEFT JOIN Sales S ON PProductID SProductID WHERE SProductID IS NOT NULL;
Consider a Products table ProductID ProductName, Price and Sales table SaleID ProductID, Quantity Find all products that have never been sold.
SELECT ProductName FROM Products WHERE ProductID NOT IN SELECT ProductID FROM Sales;
B
SELECT ProductName FROM Products WHERE ProductID IN SELECT ProductID FROM Sales WHERE Quantity ;
C
SELECT ProductName FROM Products P WHERE EXISTS SELECT FROM Sales S WHERE SProductID PProductID;
D
SELECT PProductName FROM Products P LEFT JOIN Sales S ON PProductID SProductID WHERE SProductID IS NOT NULL;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started