This project was completed as a practice exercise through DataCamp's virtual environment. This project explores whether international students’ length of stay impacts their mental health. Using SQL queries such as
AVG()
, ROUND()
, GROUP BY
, and
ORDER BY
, we analyzed their depression (PHQ-9
), social connectedness (SCS
), and acculturative stress (ASISS
) scores.
The dataset was sourced from DataCamp and reflects the results of a mental health study conducted at a Japanese international university in 2018. The study focused on both international and domestic students and included scores related to depression, social connectedness, and acculturative stress.
The goal was to explore:
length of stay
is related to mental health outcomes among international students.PHQ-9
), social connectedness (SCS
), and acculturative stress (ASISS
) scores vary by stay duration.GROUP BY
, AVG()
, and ROUND()
functions to analyze the trends.students
Field Name | Description |
---|---|
inter_dom | Types of students (international or domestic) |
japanese_cate | Japanese language proficiency |
english_cate | English language proficiency |
academic | Current academic level (undergraduate or graduate) |
age | Current age of student |
stay | Current length of stay in years |
todep | Total score of depression (PHQ-9 test) |
tosc | Total score of social connectedness (SCS test) |
toas | Total score of acculturative stress (ASISS test) |
-- AVERAGE MENTAL HEALTH DIAGNOSTIC SCORES OF THE INTERNATIONAL STUDENTS
SELECT stay,
COUNT(*) AS count_int,
ROUND(AVG(todep), 2) AS average_phq,
ROUND(AVG(tosc), 2) AS average_scs,
ROUND(AVG(toas), 2) AS average_as
FROM students
WHERE LOWER(inter_dom) = 'inter'
AND stay IS NOT NULL
GROUP BY stay
ORDER BY stay DESC
LIMIT 9;
The SQL queries returned 9 distinct lengths of stay, each with average scores for mental health indicators — helping us understand how time spent abroad may relate to well-being.
Thanks to DataCamp for providing the dataset and learning environment for this SQL project.