问题 单项选择题

第(22)~(30)题使用的数据表如下:
当前盘当前目录下有数据库db_stock,其中有数据库表stock.dbf,该数据库表的内容是:
股票代码 股票名称 单价 交易所
600600 青岛啤酒 7.48 上海
600601 方正科技 15.20 上海
600602 广电电子 10.40 上海
600603 兴业房产 12.76 上海
600604二纺机 9.96 上海
600605 轻工机械 14.39 上海
000001深发展 7.48 深圳
000002深万科 12.50 深圳

求每个交易所的平均单价的SQL语句是______。

A.SELECT 交易所,avg(单价)FROM stock GROUP BY单价

B.SELECT 交易所,avg(单价)FROM stock ORDER BY单价

C.SELECT 交易所,avg(单价)FROM stock ORDER BY交易所

D.SELECT 交易所,avg(单价)FROM stock GROUP BY交易所

答案

参考答案:D

解析:[知识点] 关系数据库标准语言SQL/SQL的数据查询功能[评析] 本题要求的是每个交易所的平均单价,使用SELECT语句来完成该操作,通过GROUP BY按交易所进行分组。AVG()是求平均的函数,选项B、C使用ORDER BY是排序语句,不正确。选项A是按照单价进行分组也不正确。

填空题

Marks & Spencer has a very good reputation for job security and looking after its staff, with things like good perks, (1) , that sort of thing. Do those things actually (2)
I think it is, it is very important. When people have been working (3) , and they may have been in from seven or eight o’clock in the morning, they can come off the sales floor and can go to (4) and obviously they can have tea, coffee, or (5) , and can then buy at very reduced rates (6) , if they want one, or a roll and cheese, in a pleasant environment, (7) , food of the highest quality, there’re areas where they can (8) , or play pool or something, yeah, that is very important because they need (9) . At busy times, they need to get away from it, they need to be able to relax. In terms of all the (10) we’ve got, that is very important, when people know that they will be having medicals, and (11) is another thing, obviously there’s (12) that they will buy which they will be able to buy (13) . For Christmas bonus, we give all our general staff (14) which is guaranteed, and the (15) of that, actually, at the busiest time of the year when they’re (16) and working hard, is fantastic and to see their faces as you (17) with 10% of their salary in it. I believe the environment that you work in, (18) that you work with, the way you are treated, (19) , and the fact that your views are listened to, and you feel you are consulted, that makes people (20) and makes them get up and come to work in the morning.

单项选择题