Download Querying Data with Transact-SQL.70-761.BrainDumps.2018-05-18.75q.tqb

Vendor: Microsoft
Exam Code: 70-761
Exam Name: Querying Data with Transact-SQL
Date: May 18, 2018
File Size: 15 MB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Purchase
Coupon: EXAM_HUB

Discount: 20%

Demo Questions

Question 1
You have a database that includes the following tables:
   
You need to create a list of all customer IDs and the date of the last order that each customer placed. If the customer has not placed any orders, you must return the date January 1, 1900. The column names must be CustomerID and LastOrderDate. 
Which four Transact-SQL segments should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the correct order.  
Correct answer: To display the answer, ProfExam Simulator is required.
Explanation:
Box 1: SELECT..COALESCE…The COALESCE function evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL. Box 2: ..LEFT OUTER JOIN..The LEFT JOIN (LEFT OUTER JOIN) keyword returns all rows from the left table (table1), with the matching rows in the right table (table2). The result is NULL in the right side when there is no match. A customer might have no orders so the right table must be allowed have a NULL value. Box 3: ON c.custid = o.custidWe JOIN on the custID column, which is available in both tables. Box 4: GROUP BY c.custidReferences:https://technet.microsoft.com/en-us/library/ms189499(v=sql.110).aspxhttp://www.w3schools.com/sql/sql_join_left.asp
Box 1: SELECT..COALESCE…
The COALESCE function evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL. 
Box 2: ..LEFT OUTER JOIN..
The LEFT JOIN (LEFT OUTER JOIN) keyword returns all rows from the left table (table1), with the matching rows in the right table (table2). The result is NULL in the right side when there is no match. A customer might have no orders so the right table must be allowed have a NULL value. 
Box 3: ON c.custid = o.custid
We JOIN on the custID column, which is available in both tables. 
Box 4: GROUP BY c.custid
References:
https://technet.microsoft.com/en-us/library/ms189499(v=sql.110).aspx
http://www.w3schools.com/sql/sql_join_left.asp
Question 2
You run the following Transact-SQL statement:
   
You need to ensure that you can insert data into the table. 
What are the characteristics of the data? To answer, select the appropriate options in the answer area. 
Correct answer: To display the answer, ProfExam Simulator is required.
Explanation:
Box 1: custidIDENTITY indicates that the new column is an identity column. When a new row is added to the table, the Database Engine provides a unique, incremental value for the column. Identity columns are typically used with PRIMARY KEY constraints to serve as the unique row identifier for the table. Box2: postalcodepostalcode is declared as NOT NULL, which means that a value must be inserted. Box 3: regionFax is also a correct answer. Both these two columns are declared as NULL, which means that data entry is optional. References: https://msdn.microsoft.com/en-us/library/ms174979.aspx
Box 1: custid
IDENTITY indicates that the new column is an identity column. When a new row is added to the table, the Database Engine provides a unique, incremental value for the column. Identity columns are typically used with PRIMARY KEY constraints to serve as the unique row identifier for the table. 
Box2: postalcode
postalcode is declared as NOT NULL, which means that a value must be inserted. 
Box 3: region
Fax is also a correct answer. Both these two columns are declared as NULL, which means that data entry is optional. 
References: https://msdn.microsoft.com/en-us/library/ms174979.aspx
Question 3
You create a table named Sales.Orders by running the following Transact-SQL statement:
   
 
You need to write a query that meets the following requirements:
  • removes orders from the table that were placed before January 1, 2012 
  • uses the date format of YYYYMMDD 
  • ensures that the order has been shipped before deleting the record 
Construct the query using the following guidelines:
  • use one-part column names and two-part table names 
  • do not use functions 
  • do not surround object names with square brackets 
  • do not use variables 
  • do not use aliases for column names and table names 
   
Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it. 
   
Use the Check Syntax button to verify your work. Any syntax or spelling errors will be reported by line and character position.
  1. See the solution below
Correct answer: A
Explanation:
DELETE FROM Sales.Orders WHERE OrderDate < '2012-01-01' AND ShippedDate NOT NULL References:https://msdn.microsoft.com/en-us/library/ms189835.aspxhttps://msdn.microsoft.com/en-us/library/bb630352.aspx
DELETE FROM Sales.Orders 
WHERE OrderDate < '2012-01-01' AND ShippedDate NOT NULL 
References:
https://msdn.microsoft.com/en-us/library/ms189835.aspx
https://msdn.microsoft.com/en-us/library/bb630352.aspx
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!