exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 9 question 2 discussion

Actual exam question from Microsoft's AZ-204
Question #: 2
Topic #: 9
[All AZ-204 Questions]

HOTSPOT -
You need to retrieve all order line items from Order.json and sort the data alphabetically by the city.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: orders o -
Scenario: Order data is stored as nonrelational JSON and must be queried using SQL.

Box 2:li -

Box 3: o.line_items -

Box 4: o.city -
The city field is in Order, not in the 2s.

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
Droplex
Highly Voted 3 years, 7 months ago
goodluck!
upvoted 86 times
...
cool_tool
Highly Voted 3 years, 8 months ago
The last one should be o.address.city
upvoted 28 times
Alex42
3 years, 8 months ago
address is not joined, so it has to be o.city
upvoted 3 times
mariodarken
3 years, 2 months ago
In CosmosDB SQL, if the address is not an array, it seems that you can skip the join https://docs.microsoft.com/es-es/azure/cosmos-db/sql/sql-query-getting-started#query-the-json-items
upvoted 4 times
...
SaintBahamut
3 years ago
joining is needed because we want to list line items from all orders as separate rows (it will give us order x item line of rows), adress is is just a simple object from order, that will be included for all line items due join we made
upvoted 2 times
...
...
d0bermannn
3 years, 8 months ago
exactly
upvoted 2 times
...
TonyMel
2 years, 1 month ago
correct, in 2023Mar24, score: 904/1000.
upvoted 8 times
...
...
70PineApple
Most Recent 2 years, 2 months ago
Got this in exam today..20/02/23
upvoted 1 times
...
jjjita
2 years, 3 months ago
This question is probably part of Case study Coho Winery
upvoted 1 times
...
tunaparker
3 years, 1 month ago
Now let's review all questions again because there are dozens of them lol
upvoted 7 times
...
SD5713
3 years, 2 months ago
I passed with only these questions, so don't stress guys. 80% of these questions is exactly the same. Good luck!
upvoted 22 times
GunjanLiebwein
3 years, 2 months ago
I have my exam on 25.02.2022. So let's see.
upvoted 5 times
GunjanLiebwein
3 years, 2 months ago
I Cleared it with 88%. And I got this question too.:-)
upvoted 12 times
...
...
...
altafpatel1984
3 years, 4 months ago
I got this question and json had address node inside main json. So answer would be o. address.city
upvoted 12 times
warchoon
2 years ago
Thank you. I was sure the question is incomplete
upvoted 2 times
...
...
mkqwerty
3 years, 5 months ago
HOPE NOT TO SEE YOU AGAIN
upvoted 22 times
tunaparker
3 years, 1 month ago
Hahahahhah lol :D
upvoted 1 times
...
Younes364
2 years, 7 months ago
Me too
upvoted 3 times
...
...
phvogel
3 years, 6 months ago
I suspect that the JSON document is incomplete. But if the city were going to be anywhere it would be in the Order, not the line. So the last answer is either o.city or o.address.city. For that we have to guess because there's way to tell if the address information is stored inline in the order or in a class called address. It could be either of: "street": "828 Broadway", "city": "New York" or "address": { "street": "828 Broadway", "city": "New York" }
upvoted 19 times
1CY1
9 months, 2 weeks ago
Valid point but there is no join in the query on address??? Address is a more logical structure though.
upvoted 1 times
Tlwaelo
8 months, 3 weeks ago
You do not need a join for address, is an object that is included on each order object. So we just have to order by its field (city) directly. o.address.city
upvoted 1 times
...
...
altafpatel1984
3 years, 4 months ago
I got this question and json had address node inside main json. So answer would be o. address.city
upvoted 14 times
ks321
1 year, 9 months ago
Thanks Bro!
upvoted 1 times
...
...
...
ning
3 years, 8 months ago
Where is the city field in json???
upvoted 4 times
altafpatel1984
3 years, 4 months ago
I got this question and json had address node inside main json. So answer would be o. address.city
upvoted 8 times
...
...
GreenPanda
3 years, 8 months ago
https://docs.microsoft.com/ja-jp/azure/cosmos-db/sql-query-getting-started#query-the-json-items
upvoted 3 times
...
noip
3 years, 8 months ago
where is the city field in order?
upvoted 8 times
vokep77043
3 years, 8 months ago
Whole orders json is not showed in case study - it seems Orders.json is a single document of another Orders table/json.
upvoted 2 times
...
altafpatel1984
3 years, 4 months ago
I got this question and json had address node inside main json. So answer would be o. address.city
upvoted 4 times
gesl
3 years, 3 months ago
Are these questions enough to pass the exam?
upvoted 1 times
mariodarken
3 years, 2 months ago
I hope so.. good luck mate
upvoted 2 times
gesl
3 years, 2 months ago
Thank you mariodarken. For all wondering ... Feb./2022... Aprox. 40 out of 54 questions are covered with course. Enough to pass the exam. Good luck
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