Question
FROM p IN db.Purchases
WHERE p.Customer.Address.State == "WA" || p.Customer == NULL
WHERE p.PurchaseItems.Sum (pi => pi.SaleAmount) > 1000
SELECT p
a.
SELECT p.*
FROM Purchase p
LEFT OUTER JOIN
Customer c INNER JOIN Address a ON c.AddressID = a.ID
ON p.CustomerID = c.ID
WHERE
(a.State = 'WA' || p.CustomerID IS NULL)
AND p.ID IN
(
SELECT PurchaseID FROM PurchaseItem
GROUP BY PurchaseID WHERE SUM (SaleAmount) > 1000
)
b.
SELECT p.*
FROM Purchase p
LEFT OUTER JOIN
Customer c INNER JOIN Address a ON c.AddressID = a.ID
ON p.CustomerID = c.ID
WHERE
(a.State = 'WA' || p.CustomerID IS NULL)
AND p.ID IN
(
SELECT PurchaseID FROM PurchaseItem
GROUP BY PurchaseID HAVING SUM (SaleAmount) > 1000
)
c.
SELECT p.*
FROM Purchase p
LEFT OUTER JOIN
Customer c INNER JOIN Address a ON c.AddressID = a.ID
ON p.CustomerID = c.ID
WHERE
(a.State = 'WA' || p.CustomerID IS NULL)
AND p.ID IN
(
SELECT PurchaseID FROM PurchaseItem
GROUP BY PurchaseID HAVING SUM (SaleAmount) < 1000
)
d.
None of the mentioned
Posted under SQL Server
FROM Purchase p
LEFT OUTER JOIN
Customer c INNER JOIN Address a ON c.AddressID = a.ID
ON p.CustomerID = c.ID
WHERE
(a.State = 'WA' || p.CustomerID IS NULL)
AND p.ID IN
(
SELECT PurchaseID FROM PurchaseItem
GROUP BY PurchaseID HAVING SUM (SaleAmount) > 1000
)
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Query alternative to the following LINQ code in SQL is ____________
Similar Questions
Discover Related MCQs
Q. Which of the following sample code is used to select data Using LinQ To SQL?
View solution
Q. Which of the following code snippet would traverse through all result objects ?
View solution
Q. LINQ to SQL is considered to be one of Microsoft’s _______ products.
View solution
Q. LINQ to SQL in SQL Server fully supports ____________
View solution
Q. Point out the wrong statement.
View solution
Q. LINQ to Entities applications requires __________ mapping provider.
View solution
Q. The ______ pre-compiler translates embedded SQL into calls to the Oracle runtime library.
View solution
Q. Point out the correct statement.
View solution
Q. DataContext object is constructed in LINQ to SQL using _____________
View solution
Q. Which of the following code will retrieve all products in the Beverages category sorted by product name?
View solution
Q. Which of the following sample code is used to retrieve single row at a time?
View solution
Q. Which of the following method is used to delete records in LINQ?
View solution
Q. Which of the following code in LINQ performs functionality similar to joins in SQL?
View solution
Q. Service broker was added to SQL Server ___________
View solution
Q. Point out the correct statement.
View solution
Q. There are _________ components of the Service broker in SQL Server.
View solution
Q. Which of the following service broker component defines the infrastructure used for exchanging messages between instances?
View solution
Q. Point out the wrong statement.
View solution
Q. Service Broker also provides security by preventing __________ access from networks and by message encryption.
View solution
Q. (SSBS) is a new architecture which allows you to write ____________ message based application.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond SQL Server? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!