Skip to content
free
K
1
2
practice
Home
Math
English
Science
Social Studies
Contact
Language
English
Español
Sign In
/
High School Electives
/
Computer Science
/
SQL Aggregation and Grouping
Grade Level
Computer Science
HSCS.208 SQL Aggregation and Grouping
0%
Skill Level
🔴 Hard
00:00
Progress to Next Level
25% to Medium
Easy
Medium
Hard
Mastery
100%
Table: volunteer_hours(entry_id, volunteer_id, event_type, hours). A coordinator wants total hours by volunteer and event type for entries where hours are positive. Which query is correct?
A
SELECT volunteer_id, event_type, SUM(hours) AS total_hours FROM volunteer_hours GROUP BY volunteer_id HAVING hours > 0;
B
SELECT volunteer_id, event_type, SUM(hours) AS total_hours FROM volunteer_hours WHERE hours > 0 GROUP BY volunteer_id, event_type;
C
SELECT volunteer_id, SUM(hours) AS total_hours FROM volunteer_hours WHERE hours > 0 GROUP BY volunteer_id, event_type;
D
SELECT entry_id, event_type, SUM(hours) AS total_hours FROM volunteer_hours WHERE hours > 0 GROUP BY volunteer_id, event_type;
Submit Answer