sql 面試題
s:學生表
學生ID
姓名
k:課程表
課程ID
課程名稱
c:成績表
成績ID
學生ID
課程ID
成績
1、查 各門課程中缺少考試成績的學生
select a.sname,a.kname from (select * from s,k ) a left join c on c.sid=a.sid and c.kid=a.kid where c.chengji is null
sql 面試題
相關推薦
sql 面試題
試題 null cheng sel rom 姓名 缺少 學生 sid s:學生表 學生ID姓名k:課程表課程ID課程名稱 c:成績表成績ID學生ID課程ID成績1、查 各門課程中缺少考試成績的學生select a.sname,a.kname from (select *
SQL面試題-行列互換-if、【case when】
alt 技術 我們 rim case when ade 建表 行數 prim http://www.cda.cn/view/21469.html tb_lemon_grade中,表中字段id,student_name,course,score分別表示成績id,學生姓名,課
SQL面試題
and 試題 mit heat 指定 查詢 刪除 關聯 ner 1.表結構-- Create table 課程表 create table T_COURSE ( cno VARCHAR2(20), cname VARCHAR2(20),
必看,經典sql面試題(學生表_課程表_成績表_教師表)
tin bsp get upload png idt cimage gem 公開 點擊鏈接加入QQ群 522720170(免費公開課、視頻應有盡有):https://jq.qq.com/?_wv=1027&k=5C08ATe http://xqtesting.com
經典的一套SQL面試題及答案
SQL SqlServer 數據庫 面試經典的一套SQL面試題及答案
經典Sql面試題收集!!
Sql常見面試題(總結) 1.用一條SQL語句 查詢出每門課都大於80分的學生姓名 name kecheng fenshu 張三 語文 &nb
常見SQL面試題整理(實時更新)
1) 有一張表,裡面有3個欄位:語文,數學,英語。其中有3條記錄分別表示語文70分,數學80分,英語58分,請用一條SQL語句查詢出這三條記錄並按以下條件顯示出來: 大於或等於80表示優秀,大於或等於60表示及格,小於60分表示不及格。 select (case when 語文
9.mysql SQL面試題
Student(S#,Sname,Sage,Ssex) 學生表 S#:學號;Sname:學生姓名;Sage:學生年齡;Ssex:學生性別 Course(C#,Cname,T#) 課程表 C#,課程編號;Cname:課程名字;T
比較複雜的sql面試題
一、分組統計每個班的分數前三名(等同於LeetCode:185. Department Top Three Salaries) 表結構: create table student( id varchar(20),-- 編號 class varchar(20),-- 年級 sc
SQL面試題 三(單表、多表查詢)
一、給定一張學生成績表tb_grade:學號,姓名,科目號,科目名,分數。(如下表) (select * from tb_grade order by Sno,Cno;)+------+-------+-----+-------+-------+ | Sno | Sna
sql 面試題 函式 求工資第n多的工資
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN RETURN ( select e1.Salary from (select distinct Salary fromEmpl
sql面試題(學生表_課程表_成績表_教師表)mysql版
原帖連結:http://bbs.csdn.net/topics/280002741 建表語句: CREATE TABLE student ( s_id INT, sname varchar(32), sage INT, ssex var
SQL面試題(2)
問題描述: 本題用到下面三個關係表: CARD 借書卡。 CNO 卡號,NAME 姓名,CLASS 班級 BOOKS 圖書。 BNO 書號,BNAME 書名,AUTHOR 作者,PRICE 單價,QUANTITY 庫存冊數 BORROW 借書記錄。 CNO 借書卡號
hive之經典sql面試題
Hive sql面試 select store,count(distinct uid) as uv from Visit group by store; select * from Users order by age desc, total;
sql面試題(學生表_課程表_成績表_教師表)
原帖連結:http://bbs.csdn.net/topics/280002741 表架構 Student(S#,Sname,Sage,Ssex) 學生表 Course(C#,Cname,T#) 課程表 SC(S#,C#,score) 成績表
經典sql面試題
有3個表S,C,SC S(SNO,SNAME)代表(學號,姓名) C(CNO,CNAME,CTEACHER)代表(課號,課名,教師) SC(SNO,CNO,SCGRADE)代表(學號,課號,成
今天做的一個SQL面試題,用到了HAVING語句來限制函式關係
面試題目如上。第一題的問題主要是理解問題,容易寫成去掉"李明"的課程的學生,而不是沒選他課的學生比如錯誤sql:SELECTS.SNOFROMSLEFT JOIN SC ON S.SNO = SC.SNOWHERESC.CNO NOT IN (SELECTCNOFROMCWH
一道SQL面試題(行列互換)
有一個SQL題在面試中出現的概率極高,最近有學生出去面試仍然會遇到這樣的題目,在這裡跟大家分享一下。 題目:資料庫中有一張如下所示的表,表名為sales。 年 季度 銷售量
經典的SQL面試題(六)
1、在MS SQL Server中,用來顯示資料庫資訊的系統儲存過程是( ) A sp_ dbhelp B sp_ db C sp_ help D sp_ helpdb 2、SQL語言中,刪除一個表的命令是( ) A DELETE B DROP C CLEAR D REMOR
【SQL】今天的一個sql面試題(分組函式使用)
已經對試題做了化名處理。 表記錄如下: 根據表記錄,利用sql得出如下的結果: 這裡之所以記錄下來,是因為這個sql必須要用到高階分析函式,就是分組內排序和分組求和。 意思就是,題目要求就是按照deptno來分組,然後在分組內將記錄按照sal來排序,並且求得每條記錄