(1)查询出有两门不及格的学生信息。思路:1.先用Where子句配合score<60的条件,筛选出所有不及格的人和其不及格的课程2.再用group by子句依据姓名进行分组,并用count函数来统计每个人不及格的课程数3.最后用having子句对分组聚合后的结果进行筛选出count统计结果等于2的学...
分类:
数据库 时间:
2015-05-30 10:38:01
阅读次数:
236
Student(S#,Sname,Sage,Ssex)
学生表
Course(C#,Cname,T#)
课程表
SC(S#,C#,score)
成绩表
Teacher(T#,Tname)
教师表
问题:
1、查询“001”课程比“002”课程成绩高的所有学生的学号;
select
a.S# from (select s#,score...
分类:
数据库 时间:
2015-05-28 10:51:48
阅读次数:
245
select * from(select (row_number() OVER (ORDER BY stud_id)) as rownum,tab.* from score As tab) As t where rownum between 2 And 6
分类:
数据库 时间:
2015-05-26 23:03:09
阅读次数:
155
#include
#include
int n,m,w;
struct Student
{
char name[20];
int mingci;
int score;
};
struct Xiangmu
{
int bianhao;
char xiangname[20];
Student students[50];
int xiangscor...
分类:
其他好文 时间:
2015-05-26 16:08:08
阅读次数:
124
p421.5 1 #include 2 #include 3 #define CSIZE 4 4 #define SCORE 3 5 6 void get_info(struct students *p); 7 void get_average(struct students *p); 8 voi....
分类:
其他好文 时间:
2015-05-24 23:12:43
阅读次数:
123
一、无关子查询 查询结果作为外层查询的条件或结果集。 例如: 学生学科表 s_subject 学生学科成绩表:s_subject_score 需求:查询一个学生所有学科的成绩值。每个学生可以选择多个学科,且选择学科的数量不定。 解决:将该学生选择的所有科目查询出来,用条件in再在...
分类:
其他好文 时间:
2015-05-22 18:39:05
阅读次数:
100
一、应用场景 学生成绩表:create table s_score(id number(16) primary key not null,studentId number(16) not null,subject varchar(32) not null,test_time date defaul....
分类:
数据库 时间:
2015-05-21 19:06:59
阅读次数:
177
Description
我们知道,高中会考是按等级来的。 90~100为A; 80~89为B; 70~79 为C; 60~69为D; 0~59为E。 编写一个程序,对输入的一个百分制的成绩t,将其转换成对应的等级。
Input
输入数据有多组,每组占一行,由一个整数组成。
Output
对于每组输入数据,输出一行。如果输入数据不在0~100范围内,请输出一行:“Score is err...
分类:
编程语言 时间:
2015-05-21 09:14:36
阅读次数:
144
创建表插入数据Student(S#,Sname,Sage,Ssex) 学生表 Course(C#,Cname,T#) 课程表 SC(S#,C#,score) 成绩表 Teacher(T#,Tname) 教师表建表语句 Create table Student(S# number(4),Sname v...
分类:
数据库 时间:
2015-05-19 22:21:22
阅读次数:
152
执行强制类型转换语句。
String
// bad // => this.reviewScore = 9;
var A= this.reviewScore + '';
// good
var totalScore = '' + this.reviewScore;
// bad
var totalScore = '' + this.reviewScore + ' total score'...
分类:
编程语言 时间:
2015-05-19 14:47:52
阅读次数:
109