exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 93 discussion

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

You have a database that includes the tables shown in the exhibit. (Click the exhibit button.)

You need to create a list of all customers and the date that the customer placed their last order. For customers who have not placed orders, you must substitute a zero for the order ID and 01/01/1990 for the date.
Which Transact-SQL statement should you run?

A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A
COALESCE evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL.
References:
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-transact-sql

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
M4x
Highly Voted 5 years, 8 months ago
None of the answers contain the reference to 'you must substitute a zero for the order ID'
upvoted 19 times
imran
5 years, 6 months ago
ITS ORDER DATE NOT ORDER ID A IS CORRECT
upvoted 1 times
tz_123
4 years, 10 months ago
Calm down and re-read the question. M4x's comment makes sense.
upvoted 5 times
...
kimalto452
4 years, 4 months ago
imran CALM DOWN BRO CALM DOWN !!!!
upvoted 1 times
...
...
...
Vanesa30
Highly Voted 5 years, 1 month ago
the closest answer is A, although it is missing the statement 'you must substitute a zero for the order ID'
upvoted 9 times
...
Andy7622
Most Recent 4 years, 4 months ago
Probably , A is correct but the query wrongly recreated. ON the other site for the same question they use ISNULL for orderID, orderdate in the SELECT
upvoted 1 times
...
GigaCaster
4 years, 5 months ago
In my opinion, A is the closest as it is the closest to the requirement 'replace orderID and orderDate if no order placed'.
upvoted 1 times
...
Vinu0404
4 years, 8 months ago
Actually D is the closest. There is no OrderId used in Any other places.
upvoted 1 times
...
Barbedx
5 years, 2 months ago
also there are 1900 in date, no a 1990
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago