CS307 – Assignment 1: Basic Queries (Solution)

$ 20.99
Category:

Description

1. List all stations whose names contain the Chinese character “山”. And please output the id and the chinese name of those stations in ascending order. (Ordered by “station_id” and no duplicate records).
请列举所有站名带“山”的车站(去重),结果请输出“station_id” 和车站的中文名。输出结果请按照

2. Please order all colors in ascending order and output the name and hex number of the 5 to 10 color in order (There will be 5 colors in the output: 5, 6, 7, 8, 9).
请按照颜色的hex码从小到大排序,第五个到第九个颜色的名称和hex码是多少?(输出一共5个,排序为5,6,7,8,9的颜色。请按序输出)

Please complete the following questions 3~5 in order:
请按照顺序完成下列3~5题:
3. Please calculate how many stations on each bus line. Please output the name of each bus line and the number of the stations.
每个公交线路有几个站,请输出公交线路名称以及它所拥有的站点数?

4. Which is the max station count of all bus lines? Please output the max station number. 站点最多的一条线上有几个站点?

5. Which bus line has the maximum number of stations? Please output the max station number. Please output the number of the bus line and the max station number. If there is more than one bus line that has the max station number, please output them all in ascending order. 站点最多的一条线的名称是什么?如果有多条线路,请按升序的顺序输出它们。

Please complete the following questions 6~8 in order:
请按照顺序完成下列6~8问题:
6. Please output all bus stations that on bus line 1 or bus line 2. (No duplicate records)
1路公交车和2路公交车的车站有哪些?(去重)

7. Please output all bus stations that on bus line 1 and bus line 2.
1路公交车和2路公交车共同拥有的车站是哪几个?

8. What is the percentage of the common stations of bus lines 1 and 2 in all stations that on bus line 1. (The result should be expressed percentage and approximated to 2 decimal places.)
1路公交车和2路公交车共同拥有的车站占1路公交车车站的百分比(答案请保留两位小数)

Reviews

There are no reviews yet.

Be the first to review “CS307 – Assignment 1: Basic Queries (Solution)”

Your email address will not be published. Required fields are marked *