From 2fe03144c8e04f67ba577e611703618ab2f86710 Mon Sep 17 00:00:00 2001 From: Yurham Afif <85867455+itsapep@users.noreply.github.com> Date: Sat, 15 Jan 2022 21:23:58 +0700 Subject: [PATCH] Update DAT201x Querying with Transact-SQL-final exam and quizes.txt --- ...ith Transact-SQL-final exam and quizes.txt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/DAT201x Querying with Transact-SQL-final exam and quizes.txt b/DAT201x Querying with Transact-SQL-final exam and quizes.txt index bc3c3f2..1c92436 100644 --- a/DAT201x Querying with Transact-SQL-final exam and quizes.txt +++ b/DAT201x Querying with Transact-SQL-final exam and quizes.txt @@ -109,7 +109,7 @@ ORDER BY ProductCategoryID, ListPrice ORDER BY ProductCategoryID ASC, ListPrice DESC ORDER BY ListPrice DESC -Answer: 4 +Answer: 3 7. You write the following Transact-SQL query to retrieve data from the Sales.SalesOrderHeader table: SELECT SalesOrderID, OrderDate, Amount @@ -118,7 +118,6 @@ FROM Sales.SalesOrderHeader You want to limit the results to include only sales in the first calendar quarter of 2015. Which two of the following WHERE clauses can you use to accomplish this goal? (assume US formats for dates, for example 3/31/2015 represents March 31st 2015) -WHERE OrderDate BETWEEN '1/1/2015' AND '3/31/2015' WHERE OrderDate BETWEEN '1/1/2015' AND '3/31/2015' WHERE OrderDate > '1/1/2015' AND OrderDate < '3/31/2015' WHERE OrderDate >= '1/1/2015' AND OrderDate <= '3/31/2015' @@ -143,7 +142,7 @@ LEFT JOIN Inventory.Product AS p ON o.ProductID = p.ProductID; RIGHT JOIN Inventory.Product AS p ON o.ProductID = p.ProductID; CROSS JOIN Inventory.Product AS p; -Answer: 4 +Answer: 3 9. @@ -268,7 +267,6 @@ Which of the following subqueries should you use to complete the query? (SELECT MAX(o.OrderDate) FROM Sales.SalesOrder AS o WHERE o.CustomerID = c.CustomerID) --- Option 1