嗯嗯嗯~参考答案不一定正确哈~题意理解的不一定正确哈~英译中可能改变了语言原本的想要表达的意思~参考的时候注意一些,慎用哦~
本题的题目描述以及本题所要用到的数据库请前往我的资源里面去下载哦~
下载subway数据库,city_subway_system这两个文件哈~
嗯~本来想把题搞到这上面来的,但是排版有点难看,所以想要学习的小伙伴还是麻烦多走几步吧~
参考答案是博主本人的理解,有兴趣的小伙伴欢迎指出错误,我想听听你们的想法~
- How many usernames contain the letter A? (5)
(有多少用户名包含字母A?)
select Username
from Customer
where Username like 'A%'
3 Rows Returned
2.What is the average journey length, in seconds? (5)
(以秒为单位的平均旅程长度是多少)
select (sum (datediff(second, StartTime, EndTime))/ lenght.port)averjour from journey ,(
select sum (abs(convert (int, Journey.EndStation) –
convert(int, Journey.StartStation)))as port
from Journey
) as lenght group by lenght.port
1 Rows Returned
3. List the stations on the Eastern line (excluding City),in outbound order. (5)
(按出站顺序列出东线(不含市区)站)
select Name
from Station
where