exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 35 discussion

Actual exam question from Microsoft's 70-761
Question #: 35
Topic #: 1
[All 70-761 Questions]

DRAG DROP -
Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question on this series.
You have a database that tracks orders and deliveries for customers in North America. System versioning is enabled for all tables. The database contains the
Sales.Customers, Application.Cities, and Sales.CustomerCategories tables.
Details for the Sales.Customers table are shown in the following table:

Details for the Application.Cities table are shown in the following table:

Details for the Sales.CustomerCategories table are shown in the following table:

You are preparing a promotional mailing. The mailing must only be sent to customers in good standing that live in medium and large cities.
You need to write a query that returns all customers that are not on credit hold who live in cities with a population greater than 10,000.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segments to the correct locations. Each Transact-SQL segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: IN (
The IN clause determines whether a specified value matches any value in a subquery or a list.
Syntax: test_expression [ NOT ] IN ( subquery | expression [ ,...n ] )
Where subquery is a subquery that has a result set of one column. This column must have the same data type as test_expression.

Box 2: WHERE -

Box 3: AND [IsOnCreditHold] = 0 -
Box 4: )
References:
https://msdn.microsoft.com/en-us/library/ms177682.aspx

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dragan
Highly Voted 5 years, 11 months ago
Select CustomerID from customers where postalCityID in (select citiyID from Cities where LatestRecordedPopulation > 10000) and IsoncreditHold = 0
upvoted 25 times
...
Dieter
Highly Voted 5 years, 12 months ago
The ")" must be defined before the AND clause since Cities do not have a Credithold-Column. AND belongs to customer table
upvoted 23 times
...
fabzo
Most Recent 5 years, 10 months ago
Missing open brackets "("
upvoted 21 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...