Search
 
SCRIPT & CODE EXAMPLE
 

SQL

bus source and destination equal to destination and source of another by sql query

select b.bus_no, b.bus_name,s1.source,s1.destination
from buses b, schedule s1, schedule s2
where b.bus_no=s1.bus_no and s1.source=s2.destination
and s2.source=s1.destination and s1.bus_no!=s2.bus_no
order by bus_no;
Comment

PREVIOUS NEXT
Code Example
Sql :: sql query contains multiple ids 
Sql :: limiting query result using where in sql 
Sql :: check records older than 10 days 
Sql :: mysql db dump restore max file size issue 
Sql :: java mysql date format 
Sql :: mysql table information 
Sql :: normal mysql large import 
Sql :: IN from in sql 
Sql :: BSD sed: extra characters at the end of d command 
Sql :: plsql listagg 
Sql :: sql to linq converter online free 
Sql :: cahnge column name apex oracle 
Sql :: [] Wildcard in SQL 
Sql :: Mysql Install Ubuntu with native password 
Sql :: psql commande gset 
Sql :: can we compare two timestamps in mysql 
Sql :: difference between nvl and nvl2 in oracle 
Sql :: oracle date winter time 
Sql :: rollback to in sql 
Sql :: get employees if not contains in sql 
Sql :: update having mysql 
Sql :: cast find duration in sql 
Sql :: hive batch drop table 
Sql :: dbname+tablename 
Sql :: oracle factorial 
Sql :: select from 3 tables one is empty 
Sql :: mysql on delete set null 
Sql :: while in plsql 
Sql :: is not null mysql 
Sql :: flask sqlalchemy session delete 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =