SQLZOO(self join)writeup未完

来源:互联网 发布:linux nls 简体中文 编辑:程序博客网 时间:2024/05/27 09:49

转载自SQLZOO(self join)writeup未完

1

select count(id) from stops

2

select id from stops where name='Craiglockhart'

3.

select id,name from stops join route on stops.id=route.stopwhere route.num=4 and route.company='LRT'

4.

SELECT company, num, COUNT(*)FROM route WHERE stop=149 or stop=53GROUP BY company, numhaving count(*)=2
0 0