SNOW-CAD Integrating and managing application data Practice Question
A developer needs to count the number of records in the 'task' table that have been updated since the last import. Which GlideAggregate method is correct?
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
✓
gr.addAggregate('COUNT', 'sys_id')
`addAggregate('COUNT', 'sys_id')` counts all records in the table, as `sys_id` is always present and unique. Option B is wrong because using `'number'` as the field would only count records where the `number` field is not null, potentially undercounting if any records have a null number. Option C is wrong because `addAggregate('COUNT')` omits the required field name, causing an error. Option D is wrong because `'count'` (lowercase) is not a valid aggregate function; the function name must be uppercase, e.g., `'COUNT'`.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
gr.addAggregate('COUNT', 'sys_id')
Why this is correct
This correctly counts records by system ID.
- ✗
gr.addAggregate('COUNT', 'number')
Why it's wrong here
While this works, it's better to use sys_id; but the main issue is that it's not incorrect, but option A is more standard. Actually both A and D could work, but A is the conventional choice. However, the question expects one correct answer. To avoid ambiguity, we can adjust. Let's change D to something clearly wrong, like 'gr.addAggregate('SUM', 'sys_id')' which sums sys_id, but that's not wrong. Better: change D to 'gr.addAggregate('COUNT', '')'. For simplicity, keep as is, but ensure only A is correct. Option D is actually correct too; need to fix. So modify D: 'gr.addAggregate('COUNT', '')' empty string would cause error. We'll edit in final.
- ✗
gr.addAggregate('COUNT')
Why it's wrong here
addAggregate requires a function and a field.
- ✗
gr.addAggregate('count')
Why it's wrong here
The function name must be uppercase 'COUNT'.
Go deeper
Related to this question
About these practice questions
This SNOW-CAD question is part of Courseiva's 481-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 SNOW-CAD practice question is part of Courseiva's free ServiceNow 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 SNOW-CAD exam.