问题 单项选择题

对于图书管理数据库,查询所藏图书中,有两种及两种以上的图书出版社所出版图书的最高单价和平均单价下面SQL语句的横线部分,命令正确的是
SELECT 出版单位,MAX(单价),AVG(单价)FROM图书;
第(33)~(35)是基于下述描述。
设有图书管理数据库中包含以下表:
图书(总编号C(6),分类号C(8),书名C(16),作者C(6),出版单位C(20),单价N(6,2))
读者(借书证号C(4),单位C(8),姓名C(6),性别C(2),职称C(6),地址C(20))
借阅(借书证号C(4),总编号C(6),借书日期D(8))

A.GROUP BY 出版单位 HAVING COUNT 总编号>=2

B.GROUP BY 出版单位 HAVING COUNT(DISTINCT 总编号)>=2

C.GROUP BY 出版单位>=2

D.WHERE 总编号>=2

答案

参考答案:B

解析: 这是一个分组计算查询,要使用 SELECT命令来实现。首先按出版单位进行分组,通过 GROUP BY短语实现分组,计算每个出版社出版图书的最高价和平均单价,通过函数MAX()和AVG()实现。由于不是要查询所有出版社的信息,而是查询藏书中至少有该出版社两种图书的出版社的这些信息,即要查询的分组要满足一定的条件,这时需要用HAVING子句来限定分组的条件。HAVING是要依赖于GROUP BY而存在,不能单独使用,COUNT(DISTINCT总编号)统计每个出版社的图书种数。DISTINCT起到的作用是去掉重复值。

阅读理解
请认真阅读下列短文, 并根据所读内容在文章后表格中的空格里填入一个最恰当的单词。注意:每个空格只填一个单词。
The word science is heard so often in modern times that almost everybody has an idea of its meaning. However, its definition is difficult for many people. The meaning of the term is confusing, but everyone should understand its meaning and objectives (目标). Just to make the explanation as simple as possible, suppose science is defined as classified knowledge or facts.
Even in the true science, distinguishing fact from fiction is not always easy. For this reason great care should be taken to distinguish between beliefs and truths. There is no danger as long as a clear difference is made between temporary and proved explanations. For example, hypotheses(假设) and theories are attempts to explain natural phenomena. From these positions the scientist continues to experiment and observe until they are proved or discredited. The exact status of any explanation should be clearly labeled to avoid confusion.
The objectives of science are primarily the discovery and later the understanding of the unknown. Man cannot be satisfied with recognizing that secrets exist in nature of that questions are unanswerable; he must solve them. Toward that end, specialists in the field of biology and related fields of interest are directing much of their time and energy.
Actually, two basic approaches lead to the discovery of new information. One, aimed at satisfying curiosity, is referred to as pure science. Sometimes practical-minded people miss the point of pure science in thinking only of its immediate application for economic rewards. However, one should remember that the construction of the microscope had to come before the discovery of the cell. The host of scientists devoting their lives to pure science are not apologetic about ignoring the practical side of their discoveries; they know from experience that most knowledge is eventually applied.
The other is aimed at using knowledge for specific purposes--for instance, improving health, raising standards of living, or creating new consumer products. In this case, knowledge is put to economic use. Such an approach is referred to as applied science.
The小题1:of science
小题2:__________ of science
● To define science, we may小题3:________call it classified knowledge or facts.
● It is essential, though not 小题4:_____  , for us to distinguish fact from fiction.
Objectives of science
Science is 小题5:______ at discovering and understanding the unknown.
Two basic
小题6:_________to
new discovery
Pure science
Scientists, who may be blamed for小题7:____ the practical side of their work, make discoveries out of 小题8:_______. 
小题9:______science
Knowledge is put to economic 小题10:_______, for example, improving health, raising living standards and creating new products.
单项选择题 A1/A2型题