freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

數據庫系統(tǒng)概論(1)-文庫吧

2025-04-19 03:05 本頁面


【正文】 50 700 關系 account grouped by branchname: branchname balance Perryridge Brighton Redwood 1300 1500 700 branchname g sum(balance) (account) 一般的分組統(tǒng)計查詢有哪些? 聚集查詢 : ? 查詢學生人數 Select count(*) from student Select count(Sno) from student ? 查詢選修了課程的學生人數 Select count(distinct Sno) from SC ? 計算 1號課程的學生總分、最高分和最低分 Select sum(grade) as total, max(grade) as max, min(grade) as min From SC where Cno=‘1’ ? 查詢各門課程的課程號及其選課人數 Select Cno, count(Sno) from SC group by Cno ? 查詢選修了 3門以上課程的學生學號 Select Sno from SC group by Sno having count(Cno)=3 聚集查詢 ? 五種統(tǒng)計函數 ? Having 和 where 的區(qū)別 ? 有 where又有分組時,誰先執(zhí)行? ? 在聚集查詢中 , select 目標列 只能是 group by中出現的字段,或者聚集函數。 課堂練習 ? 查詢各個分支點的儲蓄總額 ? 查詢各分支點的儲蓄均額 ? 查詢各分支點的開戶總數 ? 查詢各分支點的最大最小帳戶余額 branchname accountnumber balance Perryridge Perryridge Brighton Brighton Redwood A102 A201 A217 A215 A222 400 900 750 750 700 關系 account grouped by branchname: 連接查詢 ? 查詢每個學生及其選修課程的情況(笛卡爾積) Select Student.*, SC.* From Student,SC where = ? 查詢每個學生姓名及其所選課程成績(自然連接,內連接) Select sname, o, grade From student inner join SC on = customername loannumber Jones Smith Hayes L170 L230 L155 3000 4000 1700 loannumber amount L170 L230 L260 branchname Downtown Redwood Perryridge Relation loan Relation borrower loannumber amount L170 L230 3000 4000 customername Jones Smith branchname Downtown Redwood Inner Join: loan Borrower Jones Smith null loannumber amount L170 L230 L260 3000 4000 1700 customername branchname Downtown Redwood Perryridge Left Outer Join: loan Borrower loannumber amount L170 L230 L155 3000 4000 null customername Jones Smith Hayes branchname Downtown Redwood null Right Outer Join: loan borrower loannumber amount L170 L230 L260 L155 3000 4000 1700 null customername Jones Smith null Hayes branchname Downtown Redwood Perryridge null Full Outer Join: loan borrower 外連接 ? 左外連接 : Select * from loan left outer join borrower on = ? 右外連接 Select * from loan right outer join borrower on = ? 全外連接 Select * from loan full outer join borrower on = 自身連接 查詢每門課的課程名和他的先行課的課程名(自身連接) Select as CName, as preCName From course a, course b Where = Cno Cname Cpno Ccredit 1 數據庫 5 4 2 數學 2 3 信息系統(tǒng) 1 4 4 操作系統(tǒng) 6 3 5 數據結構 7 4 6 數據處理 2 7 Pascal 6 4 Cno Cname Cpno Ccredit 1 數據庫 5 4 2 數學 2 3 信息系統(tǒng) 1 4 4 操作系統(tǒng) 6 3 5 數據結構 7 4 6 數據處理 2 7 Pascal 6 4 a b 多表連接 ? 查詢所有學生的姓名、所修的課程名和成績 Select Sname,Cname,grade From student inner join (SC inner join Course on =) on = Select Sname,Cname,grade From student,Course,SC Where = and = ? 查詢選修了 2號課程且成績在 90以上的所有學生的信息 Select student.* From student, SC Where = and grade90 and o=‘2’ 課堂練習 ? 根據書 82頁的學生數據庫,完成下面的查詢: ? 找出所有計算機系年齡在 19歲以上的同學的學號,姓名和性別,結果按年齡降序排序 ? 找出所有選修了“數據庫”的學生的學號,姓名,系 ? 找出沒有選修“數據庫”的學生的學號,姓名和系 ? 找出單科成績 =90的學生的學號,姓名,課程名,學分,成績,結果按成績 +課程號降序輸出 ? 找出所有同學的已修學分總數 ? 找出至少選修
點擊復制文檔內容
范文總結相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1