0

我想知道有哪些行星有“间谍”类型的卫星和人类物种的星系。

我很难编写不同深度级别的多个内部连接。

这是我的尝试之一:

select gal from Galaxy gal inner join gal.PlanetList planets
inner join planets.SattelitesList satts,
planets inner join planets.SpeciesList spec 
where spec.Name = 'Human' AND satts.Type = 'Spy'

我知道这行得通,但它只有一个深度分支(如二叉树的一个分支):

select gal from Galaxy gal inner join gal.PlanetList planets
inner join planets.SattelitesList satts where satts.Type ='Spy'

谢谢

4

1 回答 1

3

不能这样工作吗?

from
  gal from Galaxy gal 
  join gal.PlanetList planets
  join planets.SattelitesList satts
  join planets.SpeciesList spec 
where spec.Name = 'Human' AND satts.Type = 'Spy'
于 2011-11-10T12:17:43.987 回答