nerdexam
CompTIACompTIA

DA0-001 · Question #291

DA0-001 Question #291: Real Exam Question with Answer & Explanation

The correct answer is C: All customers older than age 60 in New York City. The SQL query provided is selecting all records from the Cust_table where the age column has values greater than 60 and the City column matches "New York". The > operator selects values that are strictly greater than the comparison value, so it does not include customers aged exa

Data Concepts and Environments

Question

An analyst has written the following code: SELECT * FROM Cust_table WHERE age > 60 AND City = "New York" Which of the following criteria is the analyst retrieving?

Options

  • AAll customers older than age 60 in New York state
  • BAll customers aged 60 and older in New York state
  • CAll customers older than age 60 in New York City
  • DAll customers younger than age 60 in New York City

Explanation

The SQL query provided is selecting all records from the Cust_table where the age column has values greater than 60 and the City column matches "New York". The > operator selects values that are strictly greater than the comparison value, so it does not include customers aged exactly 60. The term "New York" in the context of a city database typically refers to New York City, not the state of New York. Therefore, the correct answer is that the analyst is retrieving data for all customers older than age 60 in New York City.

Topics

#SQL Syntax#Data Querying#WHERE Clause#Comparison Operators

Community Discussion

No community discussion yet for this question.

Full DA0-001 PracticeBrowse All DA0-001 Questions