您将如何在Rails 4+中执行此查询

时间:2019-06-28 06:06:16

标签: sql ruby-on-rails

我现在正在执行sql Zoo,并尝试学习查询,然后在Rails中进行处理-Active Record,我看不到让内部查询正常工作,也没有使人口/ 3查询正常工作。谢谢

 SELECT name, continent FROM world AS x
    WHERE population / 3 > ALL(SELECT population FROM world AS y
    WHERE x.continent = y.continent
    AND x.name != y.name)

0 个答案:

没有答案