Saltar al contenido principal

Training Attendance: Ask the Missing Aggregate Question

Ask a clarifying question that defines row eligibility before an aggregate is calculated.

SQL basics5 min read

Imani needs to respond before writing the average-attendance query. Choose the line that defines the aggregate evidence. The manager asks for average attendance by instructor. Can you send average attendance by instructor before noon? fromTop Imani spots a denominator decision. fromBottom They agree on the row rules before the rollup. Good catch. Exclude cancelled sessions and show make-ups separately. Before I average, should cancelled sessions be excluded, counted as zero, or reported separately? Best. It defines the denominator before AVG runs and turns a hidden SQL assumption into a business rule. I can average every session row and we can…

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Contáctanos