Exam AZ-204 All QuestionsBrowse all questions from this exam
Question 342

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:

    Correct 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.

Discussion
Droplex

goodluck!

cool_tool

The last one should be o.address.city

d0bermannn

exactly

Alex42

address is not joined, so it has to be o.city

mariodarken

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

SaintBahamut

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

TonyMel

correct, in 2023Mar24, score: 904/1000.

mkqwerty

HOPE NOT TO SEE YOU AGAIN

tunaparker

Hahahahhah lol :D

Younes364

Me too

SD5713

I passed with only these questions, so don't stress guys. 80% of these questions is exactly the same. Good luck!

GunjanLiebwein

I have my exam on 25.02.2022. So let's see.

GunjanLiebwein

I Cleared it with 88%. And I got this question too.:-)

phvogel

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" }

altafpatel1984

I got this question and json had address node inside main json. So answer would be o. address.city

ks321

Thanks Bro!

1CY1

Valid point but there is no join in the query on address??? Address is a more logical structure though.

altafpatel1984

I got this question and json had address node inside main json. So answer would be o. address.city

warchoon

Thank you. I was sure the question is incomplete

noip

where is the city field in order?

vokep77043

Whole orders json is not showed in case study - it seems Orders.json is a single document of another Orders table/json.

altafpatel1984

I got this question and json had address node inside main json. So answer would be o. address.city

gesl

Are these questions enough to pass the exam?

mariodarken

I hope so.. good luck mate

gesl

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

tunaparker

Now let's review all questions again because there are dozens of them lol

ning

Where is the city field in json???

altafpatel1984

I got this question and json had address node inside main json. So answer would be o. address.city

GreenPanda

https://docs.microsoft.com/ja-jp/azure/cosmos-db/sql-query-getting-started#query-the-json-items

70PineApple

Got this in exam today..20/02/23

jjjita

This question is probably part of Case study Coho Winery