exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 3 question 34 discussion

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

HOTSPOT
-

You develop an application that sells AI generated images based on user input. You recently started a marketing campaign that displays unique ads every second day.

Sales data is stored in Azure Cosmos DB with the date of each sale being stored in a property named ‘whenFinished’.

The marketing department requires a view that shows the number of sales for each unique ad.
You need to implement the query for the view.

How should you complete the query? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

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
tcybu
Highly Voted 2 years, 5 months ago
Correct! Can't be DateTimePart as it takes two args only, see https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/date-time-functions
upvoted 26 times
Dotar
2 years, 5 months ago
You are right good sir I stand corrected.
upvoted 2 times
...
...
MysticalSam
Highly Voted 2 years ago
This question was in today's exam on 10-June-2023
upvoted 6 times
...
J_obando13
Most Recent 1 month ago
Got this in the exam today! May 15, 2025. Went most voted. 940/1000. 50 of 51 from examtopics. Cases Munson’s Pickles and Preserves Farm (7) and Fourth Coffee (3)
upvoted 2 times
...
f09229d
2 months, 2 weeks ago
In exam 30/3/2025 with this answer, I scored 907/1000
upvoted 1 times
...
38195c0
1 year ago
"The marketing department requires a view that shows the number of sales for each unique ad." - where is the ad in the query?
upvoted 2 times
DamuKeesh
4 months, 2 weeks ago
Cosider every 2nd day is generating unique ad
upvoted 1 times
...
overhill
7 months, 3 weeks ago
exactly, wrong question or wrong image
upvoted 1 times
...
...
sekelsenmat
1 year, 4 months ago
On exam 2024, went with given answer, score 872 or something. Case Study: Farmers and Distributors
upvoted 4 times
...
Vukile
1 year, 7 months ago
On exam 9 Nov 2023, went with given answer, socre 865. Case Study: Farmers and Distributors
upvoted 4 times
Ciupaz
1 year, 6 months ago
This question was inside that Case Study?
upvoted 1 times
...
...
richardc7
1 year, 8 months ago
got today in 28-09-23
upvoted 1 times
...
janzak
2 years, 1 month ago
why count and not sum?
upvoted 2 times
kgy01
2 years ago
[...]The marketing department requires a view that shows the "number of sales"[...]
upvoted 1 times
...
MDWPartners
1 year, 9 months ago
the field is a date, not a number, so you cannot sum it.
upvoted 1 times
...
...
Esward
2 years, 4 months ago
Given answers Count, DateTimeBin are correct answers as per MS docs DateTimebin takes 3 and 4 parameters but DateTimepart takes only 2 args https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/date-time-functions
upvoted 4 times
...
DP_Bhatt
2 years, 4 months ago
Correct!
upvoted 1 times
...
Dotar
2 years, 5 months ago
Anyone have an idea as to why it says day and not hour?
upvoted 2 times
plusJoyed
2 years, 1 month ago
It says every second day, so 12 hours would be twice a day. It might work if hours was 48
upvoted 1 times
...
...
Dotar
2 years, 5 months ago
Pretty sure it has to be DateTimePart(...day) option. https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/datetimepart
upvoted 1 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 ...