exam questions

Exam AWS Certified Data Engineer - Associate DEA-C01 All Questions

View all questions & answers for the AWS Certified Data Engineer - Associate DEA-C01 exam

Exam AWS Certified Data Engineer - Associate DEA-C01 topic 1 question 198 discussion

A data engineer created a table named cloudtrail_logs in Amazon Athena to query AWS CloudTrail logs and prepare data for audits. The data engineer needs to write a query to display errors with error codes that have occurred since the beginning of 2024. The query must return the 10 most recent errors.

Which query will meet these requirements?

  • A. select count (*) as TotalEvents, eventname, errorcode, errormessage from cloudtrail_logswhere errorcode is not nulland eventtime >= '2024-01-01T00:00:00Z' group by eventname, errorcode, errormessageorder by TotalEvents desclimit 10;
  • B. select count (*) as TotalEvents, eventname, errorcode, errormessage from cloudtrail_logs where eventtime >= '2024-01-01T00:00:00Z' group by eventname, errorcode, errormessage order by TotalEvents desc limit 10;
  • C. select count (*) as TotalEvents, eventname, errorcode, errormessage from cloudtrail_logswhere eventtime >= '2024-01-01T00:00:00Z' group by eventname, errorcode, errormessageorder by eventname asc limit 10;
  • D. select count (*) as TotalEvents, eventname, errorcode, errormessage from cloudtrail_logs where errorcode is not nulland eventtime >= '2024-01-01T00:00:00Z' group by eventname, errorcode, errormessagelimit 10;
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
Ramdi1
20 hours, 35 minutes ago
Selected Answer: A
Why Option A is Correct? ✅ WHERE errorcode IS NOT NULL → Filters out successful events, keeping only errors. ✅ AND eventtime >= '2024-01-01T00:00:00Z' → Ensures only logs from 2024 are considered. ✅ GROUP BY eventname, errorcode, errormessage → Aggregates error occurrences per event. ✅ ORDER BY TotalEvents DESC → Sorts by the number of occurrences, ensuring the most frequent errors appear first. ✅ LIMIT 10 → Returns only the 10 most recent errors.
upvoted 1 times
...
simon2133
2 weeks, 1 day ago
Selected Answer: A
A. Same as B but including filter for error code being set
upvoted 2 times
...
fnuuu
1 month ago
Selected Answer: B
Query in the Option B is correct with 'desc' order
upvoted 1 times
...
A_E_M
1 month, 3 weeks ago
Selected Answer: B
This is not the same, but it shows the important point. Descending order is the correct answer. SELECT * FROM cloudtrail_logs WHERE eventTime >= '2024-01-01' AND errorCode IS NOT NULL ORDER BY eventTime DESC LIMIT 10;
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago