用SQL語句查詢每門成績都大於80的學生姓名?新手求教

2021-08-25 06:07:43 字數 776 閱讀 1029

1樓:匿名使用者

select name

from stu t1

where not exists(select 1 from tab where name = t1.name and fs < 80)

2樓:齊文

select distinct a.namefrom (select name, km, fs, count(*) over(partition by name) as num

from stu) a,

(select name, count(*) num from stu where fs > 80 group by name) b

where a.num = b.num

and a.name = b.name;

3樓:匿名使用者

select distinct name from stu where name not in(select name from stu where fs<80)

4樓:科技程式迷

標準寫法:

select name as 姓名, '成績大於80分的學生' as '備註'

from stu

where fs>80

5樓:匿名使用者

select name from stu where fs>80

怎麼用sql語句查詢每門成績都大於80的學生姓名?

用SQL語句寫出,查詢所有選SQL課程的學生學號,姓名和專業

學生表 ta 選課表 tb select 學號,姓名,專業 from ta where 學號 in select 學號 from tb where 課程 sql 用sql語句查詢選修了3門及以上課程的學生學號,姓名,選修的課程數 寫乙個sql語句,查詢選修了5門課程的學生學號和姓名 select 學...

用SQL語句查詢生日以及今日生日

做兩個edit控制項bai名稱為 dumonth,day。查詢的時候對生日進行分解zhi,提取 dao日和月對比,滿足日月吻版合權的就是符合篩選條件的生日會員。select from membertable where day birthday day.text and month birthday...

用SQL語句實現查詢選修了一門以上課程學生的所有資訊。怎麼做啊

select from 學生表 where 學號 in select distinct 學號 from 選課表 select count distinct sno from sc sql如何查詢選修了兩門以上課程的學生資訊?資料庫問題 列出選修了一門以上課程的學生學號,及其選修門數 用sql語句查詢...