當前位置:首頁 » 編程語言 » sql找出同時考試的學生信息
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

sql找出同時考試的學生信息

發布時間: 2022-11-05 17:17:32

『壹』 用sql語言找出參加過兩次考試的女生;

select
distinct
*
from
STUD
A
inner
join
EXAM
B
on
A.編號=B.編號
where
A.性別='女'
and
(select
count(1)
from
EXAM
where
編號=B.編號)=2

『貳』 SQL 語句查詢所有參加考試的學生,從Stu表中和Sco表中

select * from score(成績表) where stuno(考號) in (select stuno from student)
思路是這樣的,學生表中有的考號在成績表中出現,就叫做參加考試了,更詳細的就是說,機試和筆試成績都不為null

『叄』 sql 語句編寫 查詢參加全部科目考試的學生及其成績 201601 張三 語文 82

  1. select * from 表名

  2. seelct name,subjict from 表名 where 數學 is null and 語文 is null

  3. 太復雜

『肆』 求SQL中檢索參加考試的學生學號,姓名,課程名稱,成績,按學生成績由高到低排序的代碼

select 學生學號,姓名,課程名稱,成績 from tablename order by 成績 desc

『伍』 怎麼用SQL語句,查詢參加了兩次考試的考生的身份證號

select 身份證號 from 學生表 where exists (
select 學號,count(*) from 考試表 where 學生表.學號=考試表.學號 group by 學號 having count(*) =2
)

『陸』 資料庫中查詢所有參與了考試的學生的考生姓名,年齡,平均成績,考試次數。

  • SQL語句如下: select student.sno 學號,sname姓名,sgrade 入學成績,count(cno)選課門數,avg(grade)平均分 from student,score where student.sno=score.sno group by student.sno,sname,sgrade; 其中sno、sname、sgrade、cno、grade分別為:學...

『柒』 SQL查詢選修了兩門以上(包括兩門)課程的學生信息

1:select sno(學生的學號) from sc(學生選課表)
group by sno having count(*)>1

2:select s.sno,s.name from student s
where s.sno in(select sno from score sc
group by sc.cno having sum(sc.sno)>2 )

3:應為三張表;學生表A 課程表B 選修表C(cid aid bid)--沒有選修任何課程的學生的學號

『捌』 sql統計出參加高等數學1考試的學生人數

SQLServer資料庫使用count查詢統計學生總數的操作步驟:
1、點擊開始按鈕,選擇「sqlserver管理器」選項。
2、在彈出的對話框中,選擇連接和驗證方式,點擊「連接」按鈕。
3、點擊菜單欄上的「新建查詢」按鈕。
4、在查詢對話框中,輸入「selectCOUNT(*)from學生表」,點擊執行按鈕。

『玖』 SQL,select語句的用法困惑!求大神!查詢兩個條件同時進行。考生的生源地和考生類別同時篩選!

應該是很簡單的,if else + order by 就可以了,你自己想復雜了。