Skip to content

In today's fast-paced and competitive educational environment, understanding the factors that influence student success is more important than ever. Just like the transport system in a bustling city like London must adapt to serve its residents, schools and educators must adapt to meet the needs of students. In this project, we will take a deep dive into a dataset containing rich details about various aspects of student life, such as hours studied, sleep patterns, attendance, and more, to uncover what truly impacts exam performance.

The dataset we'll be working with includes a wide range of factors influencing student performance. By analyzing this data, we'll be able to identify key drivers of success and provide insights that could help students, teachers, and policymakers make informed decisions. The table we'll use for this project is called student_performance and includes the following data:

ColumnDefinitionData type
attendancePercentage of classes attendedfloat
extracurricular_activitiesParticipation in extracurricular activitiesvarchar (Yes, No)
sleep_hoursAverage number of hours of sleep per nightfloat
tutoring_sessionsNumber of tutoring sessions attended per monthinteger
teacher_qualityQuality of the teachersvarchar (Low, Medium, High)
exam_scoreFinal exam scorefloat

You will execute SQL queries to answer three questions, as listed in the instructions.

Spinner
DataFrameas
avg_exam_score_by_study_and_extracurricular
variable
Select
	hours_studied,
	avg(exam_score) avg_exam_score
From
	student_performance
Where
	hours_studied > 10 and 
	extracurricular_activities = 'Yes'
group by
	1
order by
	1 desc
Spinner
DataFrameas
avg_exam_score_by_hours_studied_range
variable
Select
	Case
		When hours_studied between 1 and 5 then '1-5 hours'
		When hours_studied between 6 and 10 then '6-10 hours'
		When hours_studied between 11 and 15 then '11-15 hours'
		When hours_studied >= 16 then '16+ hours' END as hours_studied_range,
	AVG(exam_score) avg_exam_score
From
	student_performance
Group By
	1
Order By
	2 desc
Spinner
DataFrameas
student_exam_ranking
variable
Select
	attendance, 
	hours_studied, 
	sleep_hours, 
	tutoring_sessions,
	dense_rank() over (order by exam_score desc) exam_rank
From
	student_performance
order by
	exam_rank ASC
Limit 30