Skip to content

Hossameldin-Saber/SQL-International-Students

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

#how the length of stay (stay) impacts the average mental health diagnostic scores of the international students?

SELECT *

FROM students;

<title>Data</title>
index inter_dom region gender academic age age_cate stay stay_cate japanese japanese_cate english english_cate intimate religion suicide dep deptype todep depsev tosc apd ahome aph afear acs aguilt amiscell toas partner friends parents relative profess phone doctor reli alone others internet partner_bi friends_bi parents_bi relative_bi professional_bi phone_bi doctor_bi religion_bi alone_bi others_bi internet_bi
0 Inter SEA Male Grad 24 4 5 Long 3 Average 5 High NULL Yes No No No 0 Min 34 23 9 11 8 11 2 27 91 5 5 6 3 2 1 4 1 3 4 Yes Yes Yes No No No No No No No No
1 Inter SEA Male Grad 28 5 1 Short 4 High 4 High NULL No No No No 2 Min 48 8 7 5 4 3 2 10 39 7 7 7 4 4 4 4 1 1 1 Yes Yes Yes No No No No No No No No
2 Inter SEA Male Grad 25 4 6 Long 4 High 4 High Yes Yes No No No 2 Min 41 13 4 7 6 4 3 14 51 3 3 3 1 1 2 1 1 1 1 No No No No No No No No No No No
3 Inter EA Female Grad 29 5 1 Short 2 Low 3 Average No No No No No 3 Min 37 16 10 10 8 6 4 21 75 5 5 5 5 5 2 2 2 4 4 Yes Yes Yes Yes Yes No No No No No No
4 Inter EA Female Grad 28 5 1 Short 1 Low 3 Average Yes No No No No 3 Min 37 15 12 5 8 7 4 31 82 5 5 5 2 5 2 5 5 4 4 Yes Yes Yes No Yes No Yes Yes No No No
5 Inter SEA Male Grad 24 4 6 Long 3 Average 4 High Yes No No No No 6 Mild 38 18 8 10 8 7 3 29 83 6 5 4 2 1 1 2 1 5 1 Yes Yes No No No No No No Yes No No
6 Inter SA Male Grad 23 4 1 Short 3 Average 5 High Yes No No No No 3 Min 46 17 6 10 5 3 2 15 58 7 5 7 2 2 1 5 1 1 1 Yes Yes Yes No No No Yes No No No No
7 Inter SEA Female Grad 30 5 2 Medium 1 Low 1 Low Yes Yes Yes No No 9 Mild 41 16 20 19 15 11 6 40 127 7 2 2 2 6 2 1 1 3 1 Yes No No No Yes No No No No No No
8 Inter SEA Female Grad 25 4 4 Long 4 High 4 High No No No Yes Other 7 Mild 36 22 12 13 13 10 6 33 109 4 4 4 4 4 4 4 4 4 4 No No No No No No No No No No No
9 Inter Others Male Grad 31 5 2 Medium 1 Low 4 High Yes Yes No No No 3 Min 48 8 4 5 12 3 2 17 51 1 1 1 2 1 1 2 1 2 1 No No No No No No No No No No No

#Find the number of international students and their average scores by length of stay, in descending order of length of stay

  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 inter_dom = 'Inter'

  GROUP BY stay

  ORDER BY stay DESC;

JOIN1.html

<title>Data</title>
stay count_int average_phq average_scs average_as
10 1 13.00 32.00 50.00
8 1 10.00 44.00 65.00
7 1 4.00 48.00 45.00
6 3 6.00 38.00 58.67
5 1 0.00 34.00 91.00
4 14 8.57 33.93 87.71
3 46 9.09 37.13 78.00
2 39 8.28 37.08 77.67
1 95 7.48 38.11 72.80

About

At this DataCamp project I tried to find out if there are predictive factors for mental health of international students and see if the length of stay is a contributing factor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors