OrientDB: Efficient way to select records with a value equal to the max of all such values?

限于喜欢 提交于 2019-12-11 05:10:07

问题


I'm not sure how to do this without using a JOIN (which ODB doesn't have, of course). In "generic" SQL, you might do something like this:

Select * FROM table
INNER JOIN
  (SELECT max(field) AS max_of_field, key FROM table GROUP BY key) sub
ON table.field = sub.max_of_field AND table.key = sub.key

Is there an efficient way to do this in ODB, using SELECT and/or MATCH?

来源:https://stackoverflow.com/questions/49460138/orientdb-efficient-way-to-select-records-with-a-value-equal-to-the-max-of-all-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!