Dear All,
Can anyone assist with writing the below query in syntax that Oracle will understand? I am having trouble with the cross join syntax....
Please excuse my ignorance, I am new to SQL!
** THANKS TO bperry FOR THE SOURCE SQL**
Select f2.flightno, COUNT(f2.flightno) as NumCities
From FLIGHT f2
cross join
(
Select fto ,flightno
From FLIGHT
Where flightno = 'EA31'
) f1
Where f2.flightno <> 'EA31' and f2.fto = f1.fto
Group by f2.flightno
Having COUNT(f2.flightno) =
(select count(flightno) from FLIGHT
where flightno = 'EA31')
Can anyone assist with writing the below query in syntax that Oracle will understand? I am having trouble with the cross join syntax....
Please excuse my ignorance, I am new to SQL!
** THANKS TO bperry FOR THE SOURCE SQL**
Select f2.flightno, COUNT(f2.flightno) as NumCities
From FLIGHT f2
cross join
(
Select fto ,flightno
From FLIGHT
Where flightno = 'EA31'
) f1
Where f2.flightno <> 'EA31' and f2.fto = f1.fto
Group by f2.flightno
Having COUNT(f2.flightno) =
(select count(flightno) from FLIGHT
where flightno = 'EA31')