Explore the data model
Last updated
/* Aggregate XP and time spent for January 2025 on courses,
practices, projects, and assessments */
SELECT
content.technology,
sum(xp_earned) as total_xp,
sum(duration_engaged) as time_spent_seconds
FROM group_1234.fact_learn_events AS events
LEFT JOIN group_1234.dim_content AS content
ON content.content_id = events.content_id
-- limit to courses, practices, projects, and assessments
WHERE events.event_name IN ('course_engagement',
'practice_engagement',
'project_engagement',
'assessment_engaged')
AND date(events.occurred_at) BETWEEN '2025-01-01' AND '2025-01-31'
GROUP BY content.technology