用最高效最简单的sql列出各班成绩最高的列表(List the highest ranked lists in each class with the most efficient and simple SQL).doc

用最高效最简单的sql列出各班成绩最高的列表(List the highest ranked lists in each class with the most efficient and simple SQL).doc

  1. 1、本文档共26页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
用最高效最简单的sql列出各班成绩最高的列表(List the highest ranked lists in each class with the most efficient and simple SQL)

用最高效最简单的sql列出各班成绩最高的列表(List the highest ranked lists in each class with the most efficient and simple SQL) 1, table: table1 (FId, Fclass, Fscore), with the most efficient and simple SQL list of the highest list of classes, display classes, grades two fields. Select, fClass, max (fscore), from, table1, group, by, fClass, FID 2, there is a table table1, there are two fields FID, Fno, the word is not empty, write a SQL statement, listed in the table of a FID corresponding to a number of different Fno records. Class such as: 101a1001 101a1001 102a1002 102a1003 103a1004 104a1005 104a1006 105a1007 105a1007 105a1007 Result: 102a1002 102a1003 104a1005 104a1006 Select t2.* from table1 T1, table1 T2 where t1.fid and t1.fno t2.fno = t2.fid; 3, staff table empinfo ( Fempno VARCHAR2 (10) not null pk, Fempname VARCHAR2 (20) not null, Fage number not null, Fsalary number not null ); If the amount of data is about 10 million; write a SQL that you think is the most efficient; use a SQL to calculate the following four types of people: Fsalary9999, and, Fage 35 Fsalary9999 and Fage 35 Fsalary, 9999, and, Fage 35 Fsalary 9999 and Fage 35 Number of employees per employee; Select sum (case, when, fsalary 9999, and, Fage 35 Then 1 Else 0end) as fsalary9999_fage35, Sum (case, when, fsalary 9999, and, Fage, 35 Then 1 Else 0 End) as fsalary9999_fage35, Sum (case, when, fsalary, 9999, and, Fage 35) Then 1 Else 0 End) as fsalary9999_fage35, Sum (case, when, fsalary, 9999, and, Fage, 35) Then 1 Else 0 End) as fsalary9999_fage35 From empinfo; 4, table A fields are as follows Month person income Monthly personnel income Requires a SQL statement (attention is one) where all (non personnel) monthly and last month and next months total income Request list output as In July, the months earnings last month earned income next month MONTHS PERSON INCOME ------------------------------200807 mantisXF 5000200806 mantisXF2 3500200806 mantisXF3 3000200805 mantisXF1 2000200805 mantisXF6 22002008

您可能关注的文档

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档