Skip to content

Does going to university in a different country affect your mental health? A Japanese international university surveyed its students in 2018 and published a study the following year that was approved by several ethical and regulatory boards.

The study found that international students have a higher risk of mental health difficulties than the general population, and that social connectedness (belonging to a social group) and acculturative stress (stress associated with joining a new culture) are predictive of depression.

Explore the students data using PostgreSQL to find out if you would come to a similar conclusion for international students and see if the length of stay is a contributing factor.

Here is a data description of the columns you may find helpful.

Field NameDescription
inter_domTypes of students (international or domestic)
japanese_cateJapanese language proficiency
english_cateEnglish language proficiency
academicCurrent academic level (undergraduate or graduate)
ageCurrent age of student
stayCurrent length of stay in years
todepTotal score of depression (PHQ-9 test)
toscTotal score of social connectedness (SCS test)
toasTotal score of acculturative stress (ASISS test)
Spinner
DataFrameas
students
variable
-- Data in students
SELECT * 
FROM public.students
LIMIT 10;
Spinner
DataFrameas
df7
variable
-- Gender Differences: trends for international students 

SELECT 
	s.gender,
	ROUND(AVG(s.todep), 2) AS average_depression_score,
    ROUND(AVG(s.tosc), 2) AS average_social_connectedness,
    ROUND(AVG(s.toas), 2) AS average_acculturative_stress
FROM public.students AS s
WHERE s.inter_dom = 'Inter'
GROUP BY s.gender;
Spinner
DataFrameas
df6
variable
-- Academic Level Impact

SELECT 
	s.academic,
	ROUND(AVG(s.todep), 2) AS average_depression_score,
    ROUND(AVG(s.tosc), 2) AS average_social_connectedness,
    ROUND(AVG(s.toas), 2) AS average_acculturative_stress
FROM public.students AS s
GROUP BY s.academic
	HAVING ROUND(AVG(s.todep), 2) IS NOT NULL
	AND ROUND(AVG(s.tosc), 2) IS NOT NULL
	AND ROUND(AVG(s.toas), 2) IS NOT NULL;
Spinner
DataFrameas
df5
variable
-- International vs. Domestic Students

SELECT 
	s.inter_dom,
	ROUND(AVG(s.todep), 2) AS average_depression_score,
    ROUND(AVG(s.tosc), 2) AS average_social_connectedness,
    ROUND(AVG(s.toas), 2) AS average_acculturative_stress
FROM public.students AS s
GROUP BY s.inter_dom
HAVING ROUND(AVG(s.todep), 2) IS NOT NULL
	AND ROUND(AVG(s.tosc), 2) IS NOT NULL
	AND ROUND(AVG(s.toas), 2) IS NOT NULL;
Spinner
DataFrameas
df3
variable
-- Acculturative Stress by Length of Stay

SELECT 
	stay_cate,
	ROUND(AVG(s.tosc), 2) AS average_social_connectedness,
    ROUND(AVG(s.toas), 2) AS average_acculturative_stress
FROM public.students AS s
GROUP BY s.stay_cate
HAVING ROUND(AVG(s.tosc), 2) IS NOT NULL
	AND ROUND(AVG(s.toas), 2) IS NOT NULL
ORDER BY stay_cate;
Spinner
DataFrameas
df4
variable
-- Language Proficiency vs. Depression

SELECT 
	english_cate,
	ROUND(AVG(s.todep), 2) AS average_depression_score
FROM public.students AS s
GROUP BY s.english_cate
HAVING ROUND(AVG(s.todep), 2) IS NOT NULL;
Spinner
DataFrameas
df
variable
-- Impact on mental health grouped by years of stay

SELECT
    s.stay,
    COUNT(*) AS count_int,
    ROUND(AVG(s.todep), 2) AS average_phq,
    ROUND(AVG(s.tosc), 2) AS average_scs,
    ROUND(AVG(s.toas), 2) AS average_as
FROM public.students AS s
WHERE s.inter_dom = 'Inter'
GROUP BY s.stay DESC
ORDER BY s.stay DESC
LIMIT 9;
Spinner
DataFrameas
df1
variable
-- Religion influence over mental health 
SELECT 
    religion,
    ROUND(AVG(todep), 2) AS avg_PHQ_9,
    ROUND(AVG(tosc), 2) AS avg_SCS,
    ROUND(AVG(toas), 2) AS avg_ASISS
FROM public.students AS s
WHERE 
	todep IS NOT NULL
	AND tosc IS NOT NULL 
	AND toas IS NOT NULL
GROUP BY s.religion
ORDER BY 
	avg_PHQ_9 DESC, 
	avg_SCS DESC, 
	avg_ASISS DESC;
Spinner
DataFrameas
df2
variable
-- Interntional woman depression score depending on their ENG language level
SELECT 
    s.gender,
    s.english_cate AS english_level,
    ROUND(AVG(todep), 2) AS avg_PHQ_9
FROM public.students AS s
WHERE s.gender = 'Female'
	AND s.inter_dom = 'Inter'
GROUP BY 
	s.english_cate;