HOTSPOT - You need to retrieve all order line items sorted 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:
Suggested Answer:Explanation
Scenario: Order data is stored as nonrelational JSON and must be queried using Structured Query Language (SQL). The Order data is stored in a Cosmos database.
I have found options and answers in AZ-200 exam:
Options: https://www.examtopics.com/assets/media/exam-media/02521/0007200001.jpg
Answer: https://www.examtopics.com/assets/media/exam-media/02521/0007300001.jpg
Are you sure this is the answer?
I have seen other posts that say this is the answer....
select.....
from li.lineItems li
join o in li.line_items
order by li.city
It would make sense that LineItems would be a part of the a single order so if multiple LineItems are in an order the answer from Daltonic75 appears to be logically right
The image is being chopped off so I couldn't see schema, however, it does not make sense to put City field in LineItems, because typically an Order should have one and only one customer and one (shipping/billing) address, so answer must be either o.city or o.address.city.
yes, i was able to download the full json. City belongs to address in orders.json, so the correct answer is:
1. Orders o
2. Join li
3. o.line_items
4. O.adress.city
S
Options ([{option1}, {option2} ...]
SELECT li.id AS lineitemid, li.price
FROM [{Orders o}, {LineItems li}]
JOIN [{li}, {o}] IN [{o.line_items}, {li.line_items}, {o.address}]
ORDER BY [{o.address.city},{li.address.city},{o.city},{li.city}] ASC
Answer is correct.
SELECT .. FROM Orders O JOIN li IN o.line_items ORDER BY o.address.city
Got this question at the exam and scored 100% on Azure Storage, so this must be correct.
This section is not available anymore. Please use the main Exam Page.AZ-203 Exam Questions
Log in to ExamTopics
Sign in:
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.
Daltonic75
Highly Voted 5 years, 3 months agoriley5
5 years, 1 month agoIq
5 years, 1 month agolau13
5 years agoLkk51
5 years agoMvii
5 years, 1 month agooxaytol
4 years, 11 months agoJuanlu
4 years, 3 months agoDaltonic75
Highly Voted 5 years, 3 months agoLarry616
4 years, 9 months agomeoukg
Most Recent 3 years, 3 months agoSnakePlissken
4 years agopurav1009
5 years, 3 months ago