第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

mysql查詢數(shù)據(jù)庫(kù)的成績(jī)高于其平均成績(jī)的學(xué)生的姓名?寫出打部分來(lái)了,但是就是不對(duì),來(lái)個(gè)大神幫我看看

mysql查詢數(shù)據(jù)庫(kù)的成績(jī)高于其平均成績(jī)的學(xué)生的姓名?寫出打部分來(lái)了,但是就是不對(duì),來(lái)個(gè)大神幫我看看

俠客島的含笑 2016-10-13 21:36:41
mysql> select sname from student,sc where student.sno=sc.sno and sc.sno not in?(select r.sno from (select sno,score from sc,course where sc.cno=course.cno and course.cname='數(shù)據(jù)庫(kù)') AS r INNER JOIN(select sno,avg(score) avg_grade FROM sc group by sno) AS t ON r.sno=t.sno and r.score<t.avg_grade);
查看完整描述

3 回答

已采納
?
一瞬兒光

TA貢獻(xiàn)178條經(jīng)驗(yàn) 獲得超70個(gè)贊

SELECT?sname?FROM?student?WHERE?sno?in(SELECT?sno?FROM?sc?WHERE?score?>=?(SELECT?avg(`score`)?FROM?sc?GROUP?BY?(SELECT?cno?FROM?course?WHERE?cname='數(shù)據(jù)庫(kù)')));
查看完整回答
反對(duì) 回復(fù) 2016-10-14
?
一瞬兒光

TA貢獻(xiàn)178條經(jīng)驗(yàn) 獲得超70個(gè)贊

SELECT?sname?from?student?WHERE?sno?in(select?temp.sno?FROM?(select?sno,avg(score)?as?avgs?FROM?sc?GROUP?BY?sno)?as?temp?where?temp.sno?in(SELECT?sc.sno?from?sc?where?sc.sno=temp.sno?and?sc.cno=(SELECT?course.cno?from?course?WHERE?cname='數(shù)據(jù)庫(kù)')?and?sc.score>=temp.avgs));

你的表述就有問(wèn)題,還0分,無(wú)語(yǔ)?。。∵@會(huì)再試試吧

查看完整回答
1 反對(duì) 回復(fù) 2016-10-14
?
俠客島的含笑

TA貢獻(xiàn)552條經(jīng)驗(yàn) 獲得超285個(gè)贊

SELECT sname FROM student WHERE sno in(SELECT sno FROM sc WHERE cno=(SELECT cno FROM course WHERE cname='數(shù)據(jù)庫(kù)') and score>=(SELECT avg(`score`) FROM sc group BY sno));

查看完整回答
反對(duì) 回復(fù) 2016-10-14
  • 3 回答
  • 0 關(guān)注
  • 6456 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)