Difference between revisions of "NSS Tutorial"
From SQLZOO
(→National Student Survey 2012) |
|||
| Line 1: | Line 1: | ||
<div class="ref_section"> | <div class="ref_section"> | ||
<table class='db_ref'> | <table class='db_ref'> | ||
| − | <tr><th>Field</th><th>Type | + | <tr><th>Field</th><th>Type</th></tr> |
| + | <tr><td>ukprn</td><td>varchar(8)</td></tr> | ||
| + | <tr><td>institution</td><td>varchar(100)</td></tr> | ||
| + | <tr><td>subject</td><td>varchar(60)</td></tr> | ||
| + | <tr><td>level</td><td>varchar(50)</td></tr> | ||
| + | <tr><td>question</td><td>varchar(10)</td></tr> | ||
| + | <tr><td>A_STRONGLY_DISAGREE</td><td>int(11)</td></tr> | ||
| + | <tr><td>A_DISAGREE</td><td>int(11)</td></tr> | ||
| + | <tr><td>A_NEUTRAL</td><td>int(11)</td></tr> | ||
| + | <tr><td>A_AGREE</td><td>int(11)</td></tr> | ||
| + | <tr><td>A_STRONGLY_AGREE</td><td>int(11)</td></tr> | ||
| + | <tr><td>A_NA</td><td>int(11)</td></tr> | ||
| + | <tr><td>CI_MIN</td><td>int(11)</td></tr> | ||
| + | <tr><td>score</td><td>int(11)</td></tr> | ||
| + | <tr><td>CI_MAX</td><td>int(11)</td></tr> | ||
| + | <tr><td>response</td><td>int(11)</td></tr> | ||
| + | <tr><td>sample</td><td>int(11)</td></tr> | ||
| + | <tr><td>aggregate</td><td>char(1)</td></tr> | ||
| + | </table> | ||
</div> | </div> | ||
| Line 31: | Line 49: | ||
AND institution='Edinburgh Napier University' | AND institution='Edinburgh Napier University' | ||
AND subject='(8) Computer Science' | AND subject='(8) Computer Science' | ||
| + | </source> | ||
| + | </div> | ||
| + | |||
| + | ==Calculate how many agree or strongly agree== | ||
| + | <div class='qu'> | ||
| + | <p class='imper'>Show the institution and subject where 100% (or more) or students agree or strongly agree with question 15. | ||
| + | </p> | ||
| + | |||
| + | <source lang='sql' class='def'> | ||
| + | SELECT response | ||
| + | FROM nss | ||
| + | WHERE question='Q01' | ||
| + | AND institution='Edinburgh Napier University' | ||
| + | AND subject='(8) Computer Science' | ||
| + | </source> | ||
| + | |||
| + | <source lang='sql' class='ans'> | ||
| + | SELECT institution, subject | ||
| + | FROM nss | ||
| + | WHERE question='Q15' | ||
| + | AND A_STRONGLY_AGREE+A_AGREE>=100 | ||
</source> | </source> | ||
</div> | </div> | ||
Revision as of 22:57, 9 December 2012
| Field | Type |
|---|---|
| ukprn | varchar(8) |
| institution | varchar(100) |
| subject | varchar(60) |
| level | varchar(50) |
| question | varchar(10) |
| A_STRONGLY_DISAGREE | int(11) |
| A_DISAGREE | int(11) |
| A_NEUTRAL | int(11) |
| A_AGREE | int(11) |
| A_STRONGLY_AGREE | int(11) |
| A_NA | int(11) |
| CI_MIN | int(11) |
| score | int(11) |
| CI_MAX | int(11) |
| response | int(11) |
| sample | int(11) |
| aggregate | char(1) |
National Student Survey 2012
The National Student Survey http://www.thestudentsurvey.com/ is presented to thousands of graduating students in UK Higher Education. The survey asks 22 questions, students can respond with STRONGLY DISAGREE, DISAGREE, NEUTRAL, AGREE or STRONGLY AGREE.
The table nss has one row per institution, subject and question.
Check out one row
The example shows the number who responded for:
- question 1
- at 'Edinburgh Napier University'
- studying '(8) Computer Science'
Show the the percentage who STRONGLY AGREE
SELECT response FROM nss WHERE question='Q01' AND institution='Edinburgh Napier University' AND subject='(8) Computer Science'
SELECT A_STRONGLY_AGREE FROM nss WHERE question='Q01' AND institution='Edinburgh Napier University' AND subject='(8) Computer Science'
Calculate how many agree or strongly agree
Show the institution and subject where 100% (or more) or students agree or strongly agree with question 15.
SELECT response FROM nss WHERE question='Q01' AND institution='Edinburgh Napier University' AND subject='(8) Computer Science'
SELECT institution, subject FROM nss WHERE question='Q15' AND A_STRONGLY_AGREE+A_AGREE>=100