赞
踩
以下数据来自SQL Zoo
- SELECT A_STRONGLY_AGREE
- FROM nss
- WHERE question='Q01'
- AND institution='Edinburgh Napier University'
- AND subject='(8) Computer Science'
- SELECT institution,subject
- FROM nss
- WHERE question='Q15'
- AND score >=100
- SELECT institution,score
- FROM nss
- WHERE question='Q15'
- AND score <50
- AND subject='(8) Computer Science'
- SELECT subject,sum(response)
- FROM nss
- WHERE question='Q22'
- AND (subject='(8) Computer Science' or subject = '(H) Creative Arts and Design')
- group by subject
- SELECT subject,sum(response*A_STRONGLY_AGREE)/100
- FROM nss
- WHERE question='Q22'
- AND (subject='(8) Computer Science' or subject = '(H) Creative Arts and Design')
- group by subject
- SELECT subject,
- ROUND(SUM(response*A_STRONGLY_AGREE) / SUM(response))
- FROM nss
- WHERE question = 'Q22'
- AND (subject = '(H) Creative Arts and Design' OR subject = '(8) Computer Science')
- GROUP BY subject
- SELECT institution,round(sum(score*response)/sum(response))
- FROM nss
- WHERE question='Q22'
- AND (institution LIKE '%Manchester%')
- group BY institution
- order by institution
- SELECT institution,sum(sample),SUM(CASE WHEN subject = '(8) Computer Science' THEN sample ELSE NULL END)
- FROM nss
- WHERE question='Q01'
- AND (institution LIKE '%Manchester%')
- group by institution
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。