Exam4Training

Which two queries can you use to retrieve data for the report?

You are developing an application that will use an Azure Cosmos DB Core (SQL) API account as a data source.

You need to create a report that displays the top five most ordered fruits as shown in the following table.

A collection that contains aggregated data already exists.

The following is a sample document:

{

"name": "apple",

"type": ["fruit", "exotic"],

"orders": 10000

}

Which two queries can you use to retrieve data for the report? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A)

B)

C)

D)

A . Option A
B . Option B
C . Option C
D . Option D

Answer: B,D

Explanation:

ARRAY_CONTAINS returns a Boolean indicating whether the array contains the specified value. You can check for a partial or full match of an object by using a boolean expression within the command.

Incorrect Answers:

A: Default sorting ordering is Ascending. Must use Descending order.

C: Order on Orders not on Type.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-array-contains

Latest DP-420 Dumps Valid Version with 51 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version