Courseiva
Exploratory Data AnalysishardMultiple ChoiceObjective-mapped

MLS-C01 COUNT(*) Practice Question

Network Topology
Athena query result|Query: SELECT COUNTRefer to the exhibit.col1 | col2 | col3A | 1 | 10B | null | 20C | 3 | nullD | null | null

The exhibit shows an Athena query result from a table. What is the output of the query?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

2, 4, 4

The query returns COUNT(col2)=2 (only rows 1 and 3 have non-null col2), COUNT(*)=4 (total rows), COUNT(DISTINCT col1)=4 (distinct values A, B, C, D). Option A is wrong because COUNT(col2) is 2, not 3. Option B is wrong because COUNT(*) is 4, not 3. Option D is wrong because COUNT(DISTINCT col1) is 4, not 3.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • 3, 3, 4

    Why it's wrong here

    COUNT(col2) is 2, not 3; COUNT(*) is 4, not 3.

  • 2, 3, 3

    Why it's wrong here

    COUNT(*) is 4, not 3; distinct col1 is 4, not 3.

  • 2, 4, 4

    Why this is correct

    Correct counts: col2 non-null=2, rows=4, distinct col1=4.

  • 2, 4, 3

    Why it's wrong here

    COUNT(DISTINCT col1) is 4, not 3.

About these practice questions

This MLS-C01 question is part of Courseiva's 1,672-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on MLS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An Athena query SELECT COUNT(*) FROM table WHERE col1 IS NULL returns the value 5000. What does this value represent?

medium
  • A.The total number of rows in the table
  • B.The number of rows where col1 is NULL
  • C.The number of rows where col1 is not NULL
  • D.The number of distinct values in col1

Why B: The exhibit shows the result of an Athena query that counts the number of rows where col1 is NULL. The value 5000 is that count. Therefore, Option B is correct. Option A is incorrect because the query does not count total rows; it filters for NULLs. Option C is incorrect because the query counts NULL rows, not non-NULL. Option D is incorrect because the query does not use DISTINCT to count distinct values.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.