exam questions

Exam DP-420 All Questions

View all questions & answers for the DP-420 exam

Exam DP-420 topic 1 question 22 discussion

Actual exam question from Microsoft's DP-420
Question #: 22
Topic #: 1
[All DP-420 Questions]

HOTSPOT -
You have a container that stores data about families.
The following is a sample document.

You run the following query against the container.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: No -
The result is empty, since the cross product of each item from source and an empty set is empty:
Note: Joins result in a complete cross product of the sets participating in the join. The result of an N-way join is a set of N-element tuples, where each value in the tuple is associated with the aliased set participating in the join and can be accessed by referencing that alias in other clauses.

Box 2: No -
The cross join is not on the pets.

Box 3: Yes -
The cross join is not on the pets.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-join

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
YJC
Highly Voted 2 years ago
After I tested with JSON, the answer is Yes, No, Yes
upvoted 29 times
ferpin
1 year, 7 months ago
You are right!
upvoted 1 times
...
susejzepol
1 year, 11 months ago
You are right! In the first question the query return a value because "c" is represent the entire document and not only the parent's array.
upvoted 5 times
...
4415b99
6 months, 4 weeks ago
it depends what is meant by `having a parent defined`. my understanding is that parent = document. so, it probably means that there is no document which corresponds to the format specified above and as a result those children have nowhere to exist. so, the answer is No, No, Yes. even if u put only { "children": [...] } as an item, it will mean that the parent is defined. while the parent's name, pets and other properties except children r not defined.
upvoted 1 times
...
...
basiltomato
Highly Voted 1 year, 8 months ago
Also tested this. There's missing comma and should be ch.firstname instead of firstName: SELECT ch.name ?? ch.firstname AS childName, f.lastName, f.parents, ARRAY_LENGTH(ch.pets) ?? 0 AS numberOfPets, ch.pets FROM mktest1 AS f JOIN ch IN f.children Answer is YES, NO, YES
upvoted 5 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