DA0-002 Data Acquisition and Preparation Practice Question
A data analyst needs to extract the year from a column named 'order_date' in a SQL database. The database supports standard SQL functions. Which function should they use?
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
✓
EXTRACT(YEAR FROM order_date)
The EXTRACT function is standard SQL for extracting date parts. EXTRACT(YEAR FROM order_date) returns the year.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
GET_YEAR(order_date)
Why it's wrong here
This function does not exist in SQL.
- ✗
YEAR(order_date)
Why it's wrong here
YEAR() is not a standard SQL function; it exists in some RDBMS but EXTRACT is standard.
- ✗
DATE_PART('year', order_date)
Why it's wrong here
This is PostgreSQL-specific, not standard SQL.
- ✓
EXTRACT(YEAR FROM order_date)
Why this is correct
Correct standard SQL syntax.
Go deeper
Related to this question
About these practice questions
This DA0-002 question is part of Courseiva's 986-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DA0-002 practice question is part of Courseiva's free CompTIA 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 DA0-002 exam.