简体   繁体   English

cube.js:FROM 子句中的子查询

[英]cube.js: subquery in FROM clause

How to do a subquery in the FROM clause in cube.js.如何在 cube.js 的 FROM 子句中进行子查询。 There is only one table.只有一张桌子。

SELECT col_a FROM 
       (SELECT col_a, col_b FROM table_name WHERE col_c=some_val ORDER BY time DESC) 
WHERE col_b=some_other_value

if you are in the same Table you could define a cube.js segment in your schema then specify the segment you are querying in your JSON Query.如果您在同一个表中,您可以在您的架构中定义一个 cube.js 段,然后在您的 JSON 查询中指定您正在查询的段。 Refer this page to in the Docs.请参阅文档中的此页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM