Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bus #source #destination #equal #destination #source #sql #query
ADD COMMENT
Topic
Name
2+5 =